using System.Windows.Forms;
public class MyForm : Form
private TextBox txtEnter;
private Label lblDisplay;
this.txtEnter = new TextBox();
this.lblDisplay = new Label();
this.btnOK = new Button();
this.Text = "My HelloWin Application";
this.txtEnter.Location = new System.Drawing.Point(16, 32);
this.txtEnter.Size = new System.Drawing.Size(264, 20);
this.lblDisplay.Location = new System.Drawing.Point(16, 72);
this.lblDisplay.Size = new System.Drawing.Size(264, 128);
this.btnOK.Location = new System.Drawing.Point(88, 224);
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
this.Controls.AddRange(new Control[] {this.txtEnter, this.lblDisplay, this.btnOK});
Application.Run(new MyForm());
private void btnOK_Click(object sender, System.EventArgs e)
lblDisplay.Text = txtEnter.Text + "\n" + lblDisplay.Text;