有个小问题请帮忙. [英] A small problem please help..

查看:53
本文介绍了有个小问题请帮忙.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,
我制作了一个窗口表单,其中第一个按钮上有两个彼此靠近的按钮,我在其Enter和Leave事件上工作以增加其大小并减小其大小..像这样

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

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..

推荐答案

控件类中有一个BringToFront方法.有帮助吗?
There is a BringToFront method in the control class. Does it help?


这篇关于有个小问题请帮忙.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆