Visual C# is one of the primary languages used in Microsoft’s .NET Framework. A more user friendly programming language than its predecessors, Visual C# allows you to create streamlined content without having to perform a significant amount of overhead. Perhaps one of the best ways to get initiated with Visual C# is to create a simple Windows Form.
Note: You must have a copy of either Microsoft Visual C# Express or Visual Studio installed on your computer in order to complete this tutorial. The latest version of Microsoft Visual C# Express is available for free from Microsoft.
1. Open Microsoft Visual C# Express, select File and click New Project from the drop down menu.
2. Select Windows Form Application from the dialog box. Click on the area at the bottom of the dialog box that says Name, enter a name for your Windows Form and click OK.
3. By default, a blank form will appear in the upper-left hand corner of your screen. On the right-hand side of the screen you will notice two docked windows: the Solution Explorer and Properties windows.
4. Click on the form, which will be named Form1. You will notice that the Properties window lists a set attributes and their corresponding values.
5. Scroll down to the text property (by default the properties are in alphabetical order) and change the text properties from Form1 to Test. Click outside of the box or press return. Notice that the title bar on your form changes to match the name of your text property.
6. Now find the Size property; you’ll notice that the property can be expanded. Click on the + to the right of the property and change the Width and Height values to 500. You will immediately observe the increased size of your form.
7. Experiment with the different properties and try to figure out what each one does. If you want to see your form in action, click on the green arrow on the Standard Toolbar located at the top of the screen or press F5.
Your Windows form may not look that exciting just yet, but you have learned the fundamentals of how to create powerful Windows applications, all without having to write a single line of code. With a little practice, the graphical user interface provided by Visual C# .NET will allow you to create the look of almost type of application in minutes.