4 找到 class 语句 public class UserControl1,将 UserControl1 更改为 LinearGradientButton以更改组件的名称。找到构造函数 public UserControl1(),将它更改为 public LinearGradientButton ()。
5 在 Class 语句,将该控件从 System.Windows.Forms.UserControl 继承的类型更改为 System.Windows.Forms.Button。这允许继承的控件继承 Button 控件的所有功能。