首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VB Dotnet >

VB.NET2010解决方案

2012-05-06 
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一般会自动生成的。

热点排行