Winfrom Button 去掉获取焦点时的边框:

自定义一个Button,重写ShowFocusCues方法

 /// <summary>
/// 去掉获取焦点的边框
/// </summary>
public class CustomButton : Button
{
protected override bool ShowFocusCues
{
get
{
//return base.ShowFocusCues;
return false;
}
}
}

  

05-11 13:57