/* * Program Desc: * * This is the program to create a Window using C# * The window will contain a label and a button. * While click the button the application will terminate. * * Author: Prabakar Devarajan [mail:prabakar_microsun@yahoo.com] * Copyright: Microsun Computer Solutions * On: 10:00 PM 1/13/2005 */ using System; //all data types and Application are here using System.Windows.Forms; //the Form is here
namespace Microsun.MyWay.MileStone1 {
public class WindowInCSharp : Form //inheriting the Form {
//lblOutput this.lblOutput.Text = " Hello World "; this.lblOutput.Location = new System.Drawing.Point(100,100); this.lblOutput.Size = new System.Drawing.Size(80,20);
//btnExit this.btnExit.Text = " Exit "; this.btnExit.Location = new System.Drawing.Point(100,130); this.btnExit.Size = new System.Drawing.Size(80,20); this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
} // constructor WindowInCSharp
// Methods
// Application Entry Point
public static void Main() { Application.Run(new WindowInCSharp()); } // method Main