Windows Develop Bookmark and Share   
 index > Windows Forms Designer > How to change button image on Mouse enter, MouseLeave and Click?
 

How to change button image on Mouse enter, MouseLeave and Click?

Hi I want to have an effect like Office 2007 ribbon panel. I want to change the button image on mouse hover (moue enter, mouse leave) and mouse click.

Please suggest some solution.
Amit Bansal  Wednesday, April 22, 2009 6:41 AM
Hey...I got the solution....

http://www.codeproject.com/KB/office/Office_2007_Button.aspx

Thanks for Replying.....
  • Marked As Answer byAmit Bansal Wednesday, April 22, 2009 10:23 AM
  •  
Amit Bansal  Wednesday, April 22, 2009 10:22 AM
Add one picturebox and handle the events

private void pictureBox1_MouseHover(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("C:\\Winter.jpg");
        }

        private void pictureBox1_MouseLeave(object sender, EventArgs e)
        {
            pictureBox1.Image = Image.FromFile("C:\\abc.jpg");
        }

Thanks, A.m.a.L | [Remember to click "mark as answered" when you get a correct reply to your question]
A.m.a.L - aditi.com - Think Product  Wednesday, April 22, 2009 7:00 AM
Hey...I got the solution....

http://www.codeproject.com/KB/office/Office_2007_Button.aspx

Thanks for Replying.....
  • Marked As Answer byAmit Bansal Wednesday, April 22, 2009 10:23 AM
  •  
Amit Bansal  Wednesday, April 22, 2009 10:22 AM

You can use google to search for other answers

Custom Search

More Threads

• How do I access the Design time (Name) property in my Design time code
• How to filter values in a PropertyGrid drop-down list
• Saving blob field to the local system
• Windows form demostration.
• Is there is any way to accesses the protected SetStyle property of a control from the outside?
• Control missing in runtime
• Design time events
• How pass current assembly to custom typeconverter to realize typelistconverter in propertygrid for my control?
• design time and compile time code
• How can Restrict a model form or Dialog form in ClientRectangle of MDI form.