C# winform中 InitializeComponent()函数
2013-11-28 10:36
399 查看
InitializeComponent()用于初始化窗体上控件。
转到它的定义函数可以看到:
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(29, 34);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(204, 21);
this.textBox1.TabIndex = 0;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.textBox1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
this.PerformLayout();
}Form1窗体上有一个textbox1,并且设置其属性。
转到它的定义函数可以看到:
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(29, 34);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(204, 21);
this.textBox1.TabIndex = 0;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.textBox1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
this.PerformLayout();
}Form1窗体上有一个textbox1,并且设置其属性。
相关文章推荐
- Matlab函数产生的Figure图形框如何嵌入C# Winform中的一个Panel中?
- C# 定时执行函数(winForm)
- C#WinForm程序常用函数设计
- C# Winform SubString()函数的用法
- c#经典常用小函数 winform
- .net c# winform带验证功能的TextBox,支持正则和自定义验证函数
- c#经典常用小函数 winform
- C# 定时执行函数(winForm)
- c# winform 子窗体更新父窗体,调用父窗体的函数
- C#winform后台代码与HTML内JS脚本函数相互调用
- C#调用MATLAB的COM组件中如果调用非自带的工具箱函数
- C# winform 右键下拉菜单
- [c#]Winform DataGridView 結合 DateTimePicker、NumericUpDown與RadioButton的應用
- C#.net winform skin 皮肤大全
- C#如何为winform程序打包发布应用(图解教程)
- C#WinForm中按钮响应回车事件的简单方法(转)
- WinForm C#拨号程序代码
- C#回调函数应用示例,形象比喻方法助理解 (转载)
- C# WinForm窗体间传值