// HelloApplication.cs (c) Kari Laitinen // http://www.naturalprogramming.com/ // 2008-02-18 File created. // 2022-12-20 Tested in Developer Command Prompt for VS 2022. /* This is an example of a C# windowing application that can be run in a Windows computer into which the .NET Framework is installed. In 2022, it was possible to test this application by first installing the free Visual Studio Community edition, and then opening the Developer Command Prompt for VS 2022. The Developer Command Prompt was easily found by searching it. In the command prompt window, the following commands could be used to compile and run: csc HelloApplication.cs HelloApplication */ using System ; using System.Windows.Forms ; using System.Drawing ; class HelloForm : Form { public HelloForm() { Text = "THIS IS WINDOW TITLE." ; Size = new Size( 400, 360 ) ; // 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 ) ; } }