Chinaunix首页 | 论坛 | 博客
  • 博客访问: 124089
  • 博文数量: 36
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 380
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-09 14:59
文章存档

2011年(1)

2010年(1)

2009年(7)

2008年(27)

我的朋友

分类: C/C++

2008-11-14 11:00:57

创建一个窗体,设置窗体的基本参数方法一 :在属性中设置。
生成的代码如下
 
 
#region Windows 窗体设计器生成的代码
  ///
  /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  /// 此方法的内容。
  ///

  private void InitializeComponent()
  {
   //
   // Form1
   //
   this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
   this.ClientSize = new System.Drawing.Size(312, 206);
   this.Name = "Form1";
   this.Text = "Label。TextBox的使用";
  }
  #endregion
 
2.在设计窗体的属性面板上单击带闪电的图标,load右侧空白处单击到代码窗口,在代码中完成属性的设计
阅读(2057) | 评论(3) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2008-11-14 11:55:06

在设计栏的工具箱中拖入工具,设置界面,写代码

chinaunix网友2008-11-14 11:17:32

this.Width = 640; this.Height = 480;

chinaunix网友2008-11-14 11:14:06

private void Form1_Load(object sender, System.EventArgs e) { this.Text = "Label控件。TextBox控件的使用——找素数"; this.Width = "640"; this.Height = "480"; }