日期:2014-05-17 浏览次数:20756 次
namespace MyNameSpace { public class MyTextBox : System.Windows.Forms.TextBox { public MyTextBox() { //设置初始背景色为黄色 this.BackColor = System.Drawing.Color.Yellow; } } }
------解决方案--------------------
public class TextBoxEx : TextBox { public TextBoxEx() { this.BackColor = Color.Red; } }
------解决方案--------------------