Is there any way to zoom buttons in c#? -
i created windows form few buttons. want when cursor points each button, button pop out or zoom , when cursor remove button, come in normal size.
could similar this:
button.mouseenter += new eventhandler(delegate(object sender, eventargs e) { button.size = new size(button.size.width + 50, button.size.height + 50); } button.location = new point(button.location.x - (50 / 2), button.location.y - (50 / 2)}); button.mouseleave += new eventhandler(delegate(object sender, eventargs e) { button.size = new size(button.size.width - 50, button.size.height - 50 }; button.location = new point(button.location.x + (50 / 2), button.location.y + (50 / 2)}); button.gotfocus += new eventhandler(delegate(object sender, eventargs e) { button.size = new size(button.size.width + 50, button.size.height + 50); } button.location = new point(button.location.x - (50 / 2), button.location.y - (50 / 2)}); button.lostfocus += new eventhandler(delegate(object sender, eventargs e) { button.size = new size(button.size.width - 50, button.size.height - 50 }; button.location = new point(button.location.x + (50 / 2), button.location.y + (50 / 2)}); you loop throught "this.controls" event, , define each button, add event. scripting, can pretty =)
Comments
Post a Comment