Click here to Skip to main content
16,012,759 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello friends ,
I making a window form in which i have two button close to each other on first button i work on its Enter and Leave event for increase its size and dec its size..like this
C#
private void button1_MouseEnter(object sender, EventArgs e)
      {
          button1.Height += 91;
          button1.Width += 94;
          button1.Image = Image.FromFile("C:\\Documents and Settings\\Administrator\\My Documents\\Downloads\\bUTTON.jpg");
          button1.Top -= 45;
          button1.Left -= 47;
      }
      private void button1_MouseLeave(object sender, EventArgs e)
      {
          button1.Height -= 91;
          button1.Width -= 94;
          button1.Image = Image.FromFile("C:\\Documents and Settings\\Administrator\\My Documents\\Downloads\\BB.jpg");
          button1.Top += 45;
          button1.Left += 47;

the problem is that when size get increase the small part of first button goes under button second..so pls help how i remove this problem that whenever i use thus event on button the get in front..
any help is welcome and appreciated..
Posted

1 solution

There is a BringToFront method in the control class. Does it help?
 
Share this answer
 
Comments
advancedansh 9-Aug-11 2:16am    
really thanks
Pravin Patil, Mumbai 9-Aug-11 2:27am    
Correct answer....
Take my 5.......

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900