8,834
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace HelloWorld
{
/**//// <summary>
/// UserControl1 的摘要说明。
/// </summary>
public class Demo : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Label label1;
/**//// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Demo()
{
// 该调用是 Windows.Forms 窗体设计器所必需的。
InitializeComponent();
// TODO: 在 InitComponent 调用后添加任何初始化
}
/**//// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if( components != null )
components.Dispose();
}
base.Dispose( disposing );
}
组件设计器生成的代码#region 组件设计器生成的代码
/**//// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(32, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(120, 32);
this.label1.TabIndex = 0;
this.label1.Text = "HelloWorld";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Demo
//
this.Controls.Add(this.label1);
this.Name = "Demo";
this.Size = new System.Drawing.Size(184, 96);
this.ResumeLayout(false);
}
#endregion
}
}