VB.NET2010解决方案

VB.NET2010public CrystalButton(){InitializeComponent()mouseAction MouseActionType.Nonethis.SetS

VB.NET2010
public CrystalButton()
  {
  InitializeComponent();

  mouseAction = MouseActionType.None;

  this.SetStyle(ControlStyles.AllPaintingInWmPaint |
  ControlStyles.DoubleBuffer |
  ControlStyles.UserPaint, true);

  //The following defaults are better suited to draw the text outline
  this.Font = new Font("Arial Black", 12, FontStyle.Bold);
  this.BackColor = Color.DarkTurquoise;
  this.Size = new Size(112, 48);
  }
怎么提示initializecomponent没有声明?怎么回事?

[解决办法]
<System.Diagnostics.DebuggerStepThrough()> 
Private Sub InitializeComponent()
''''

End Sub

InitializeComponent方法一般是设计器使用的,在VS中,VS一般会自动生成的。