001 – Windows Forms type Application Development in MS Visual Studio 2010

Windows Forms type Application Development in MS Visual Studio 2010

1. Run the Microsoft Visual Studio 2010.

2. Select the command File – > New -> Project.



Fig 1. Creating a project


  1. Select next elements in Window that appeared:

– in the “Installed Templates” field select “Visual C #”;

– in the middle window choose Windows Forms Application;

– in the field “Name” set the name of application (by default WindowsFormsApplication1);

– in the field “Solution Name” set the name of Solution File (by default WindowsFormsApplication1).

  We confirm our choice by pressing the “OK” button.

02_02_00_001_02_Fig. 2. The window of select of the type of created application


  4. In the previous window, after select Ok, MS Visual Studio will generate a programming code of project, and then window with future program’s form will appear on the screen (fig 3).


Fig 3. The window of main application form in design mode


  5. After that you can make the development of our application, place on it different components, describe own variables or methods, and bind some parts of the programming code between them, etc (fig. 4).

02_02_00_001_04_Fig. 4. Running the application through menu item


  Compiler previously checks the program text for errors. If there are no errors, then loads the program for execution. Figure 5 demonstrates the window application after loading. As seen, it is an empty form, which can respond to commands from the system menu – minimize, maximize, close (Alt + F4). The program also responds to pressing “Alt + space” through which caused the system menu.

02_02_00_001_05_Fig. 5. The program execution of the type of Windows Form’s Application


  If the text of the program has a syntax errors, the bottom of the screen in the “Error List” window displays information about the error.


Fig. 6. Window panel “Error_List” with the error information


Files list  that are created in Microsoft Visual Studio 2010

After creating an application, system MS Visual Studio generates several files that appears in the Solution Explorer (Fig. 7).



Рис. 7. Window of Solution Explorer with a list of created files


The most important files in this list have the following functions:

  Program.cs  –file is a main entry point to the application. Contains the function Main().

  Form1.cs – file corresponding to the main form of the program. The system has the ability to view the code of the main form of the program and its visual image. In this file, you can add your own variables (fields) and methods.

  Form1.Designer.cs – file containing a class that describes the elements of the form generated by the system.

  Form1.resx – file containing a list of resources that are connected to the main application form (strings, images, icons, text files).

AssemblyInfo.cs – contains information about the assembly.

Related themes: