读书人

VB.NET2010解决方案

发布时间: 2012-05-06 16:15:43 作者: rapoo

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

读书人网 >VB Dotnet

热点推荐