how to resize a button when mouse gose over it???
is it posible??

Recommended Answers

All 3 Replies

Attach a method to the MouseOver event on the button and change the size. You may have to call Refresh to get it to redraw.

You can use the MouseHover event to increase the button's size when the cursor goes over the button, and the MouseLeave event to decrease the size when the cursor leaves the button's area.

yourButton.Height and yourButton.Width can be used to increase/decrease the size.

private void button1_MouseEnter(object sender, EventArgs e)
        {
            button1.Width = 100;
            button1.Height = 48;
        }

        private void button1_MouseLeave(object sender, EventArgs e)
        {
            button1.Width = 75;
            button1.Height = 23;
        }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.