无边框设定,在XXX.Designer.cs中:
this.btnNext.FlatAppearance.BorderColor = System.Drawing.Color.White; this.btnNext.FlatAppearance.BorderSize = 0; this.btnNext.FlatAppearance.CheckedBackColor = System.Drawing.Color.White; this.btnNext.FlatAppearance.MouseDownBackColor = System.Drawing.Color.White; this.btnNext.FlatAppearance.MouseOverBackColor = System.Drawing.Color.White; this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
无焦点按钮:
1. 做一个继承于Button的对象
class NoFocusCueButton : System.Windows.Forms.Button { protected override bool ShowFocusCues { get { // 获得焦点的时候什么都不做 return false; } } }
2.在XXX.Designer.cs中:
this.btnNext = new NoFocusCueButton();