如何使鼠标移动到按钮上,使按钮有框框的效果 谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 通过onmouseover=“样式" 样式中可改变按钮任意样式 记得复制代码的时候将这2个事件勾挂到你的button的mouseenter和leave上去就看到效果罗 Graphics g; private void button1_MouseEnter(object sender, EventArgs e) { g = this.CreateGraphics(); //this.button1.Bounds.Width = 2; Rectangle rc = this.button1.Bounds; rc.X -= 2; rc.Y -= 2; rc.Width += 4; rc.Height += 4; SolidBrush sb = new SolidBrush(Color.Red); g.FillRectangle(sb, rc); } private void button1_MouseLeave(object sender, EventArgs e) { g.Clear(this.BackColor); } 不能访问fck上传的图片 如何用C#获取局域网中在线的主机名和IP 请教一个问题 如何判断更新或读取数据库的数据错误是由于连接超时造成的? 我想实现对一个对象的拖拽效果,不只该怎么做? 在一个文本框内输入几个数字或字母。然后排序。输出到另一个文本框 WPF 做的窗口在 Vista下不能正确显示 如何将一个字符串中的每一个字符分别放入到EXCEL中的一个单元格中? 各位大师扶扶贫啊,小弟有两事相问 C#里怎么制作出椭圆形按钮? 怎样在datagridview实现列的radiobutton编辑风格? picturebox控件资源释放问题?
Graphics g;
private void button1_MouseEnter(object sender, EventArgs e)
{
g = this.CreateGraphics();
//this.button1.Bounds.Width = 2;
Rectangle rc = this.button1.Bounds;
rc.X -= 2;
rc.Y -= 2;
rc.Width += 4;
rc.Height += 4;
SolidBrush sb = new SolidBrush(Color.Red);
g.FillRectangle(sb, rc);
} private void button1_MouseLeave(object sender, EventArgs e)
{
g.Clear(this.BackColor);
}