Whenever you generate a new C# Windows Application using the .NET IDE you have the following lines in the main of your program in program.cs file. Did you ever try to note what are these and what do they do. If not I will explain to you the meaning of each line.
Application.SetCompatibleTextRenderingDefault( false );
EnableVisualStyles();enables you with the XP Look and feel to your application. Just to test try adding some common controls like button, progress bar to the form using the designer and compile and run the program. You will see that they are having XP look by default but you dont have any manifest files as was the case for the legacy languages like MFC. Now try commenting the above line and you will see that your application is to the normal non - XP look application. You will see the difference only in XP but probably not in 2k as it does not have any custom theme but I have not tested this would look for some of your input.
SetCompatibleTextRenderingDefault(false);enables you with the correct rendering of text in various RTL languages. To see what it does follow the following steps.
1. Add label to the form that is generated.
2. Set the Text of the label as 4 x 4.
3. Set the RightToLeft property to Yes.
Run the application.
SetCompatibleTextRenderingDefault(false);and Run the application.
You will see the text as x 4 4. The problem is when
SetCompatibleTextRenderingDefault(false);is commented and RightToLeft is true C# application cannot render correctly the mixed character set like arabic numbers as well as english characters. x is english and 4 is number.
Run(new Form1());creates an object of your main form and runs it. I would not go into the details of the form events and component initialization here.