// HelloApplication.cs (c) Kari Laitinen // http://www.naturalprogramming.com/ // 2008-02-18 File created. // 2008-02-18 Latest modification. // This is an example of a C# windowing application that // can be run in a Windows computer into which the .NET Framework // is installed. using System ; using System.Windows.Forms ; using System.Drawing ; class HelloForm : Form { public HelloForm() { Text = "THIS IS WINDOW TITLE." ; Size = new Size( 400, 250 ) ; // This sets the size of the window. } protected override void OnPaint( PaintEventArgs paint_data ) { paint_data.Graphics.DrawString( "Hello. I am a C# Windows Application.", Font, new SolidBrush( Color.Black ), 80, 100 ) ; paint_data.Graphics.DrawString( "The coordinates of this line are (80,150).", Font, new SolidBrush( Color.Black ), 80, 150 ) ; } } class HelloApplication { static void Main() { HelloForm form_of_this_application = new HelloForm() ; Application.Run( form_of_this_application ) ; } }