VS2013 表单:如何在鼠标悬停时禁用样式更改?

VS2013 Form: How can I disable style change on mouseover?

Visual Studio 有一个强制(?)样式 属性 'mouseOverBackColor' 坚持要更改 button/checkbox 的样式。我希望按钮保留其当前样式并忽略 mouseEnter/Over/Leave 事件。

谢谢。

在您的FormNameDesigner.cs中,您可以阻止激活您想要忽略的事件。在你应该 select 事件和在 buttonName.Properties window 中创建方法之前。对于按钮,

this.button1.MouseEnter -= new 
System.EventHandler(this.button1_MouseEnter);
this.button1.MouseLeave -= new
System.EventHandler(this.button1_MouseLeave);
this.button1.MouseHover -= new
System.EventHandler(this.button1_MouseHover);