还是重新定义一个Button吧,
重新定义Button的OnPaint(PaintEventArgs e)方法,
如果鼠标不在Button中,则e.Graphics.FillRectangle(brush1.rectangle);
先判断鼠标在不在Button中,如果在,则e.Graphics.FillRectangle(brush2,rectangle);
如果鼠标按下并在Button中,则再e.Graphics.FillRectangle(brush3,rectangle);
重新定义Button的OnPaint(PaintEventArgs e)方法,
如果鼠标不在Button中,则e.Graphics.FillRectangle(brush1.rectangle);
先判断鼠标在不在Button中,如果在,则e.Graphics.FillRectangle(brush2,rectangle);
如果鼠标按下并在Button中,则再e.Graphics.FillRectangle(brush3,rectangle);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货