[英]Remove blue outlining of buttons [duplicate]
合并重复问题的答案
public class NoFocusCueButton : Button
{
public NoFocusCueButton() : base()
{
InitializeComponent();
this.SetStyle(ControlStyles.Selectable, false);
}
protected override bool ShowFocusCues
{
get
{
return false;
}
}
}
创建一个新类并继承类Button
,例如
public class OnetsButton : Button
{
public OnetsButton()
{
this.SetStyle(ControlStyles.Selectable, false);
}
}
我现在有一个解决方案,它不是很性感,但它有效。 我刚刚在表单中添加了一个隐形按钮,现在每次单击一个按钮,我都会选择隐形按钮。 适合我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.