A Windows forms application is one that runs on the desktop computer. A Windows forms application will normally have a collection of controls such as labels, textboxes, list boxes, etc.
Visual Basic Form is the container for all the controls that make up the user interface. Every window you see in a running visual basic application is a form, thus the terms form and window describe the same entity. Visual Studio creates a default form for you when you create a Windows Forms Application.
1. On the menu bar, choose File, New, Project. The dialog box should look like this.
2. Choose Visual C# in the Installed Templates list.
3. In the templates list, choose theWindows Forms Application icon. Name the new form WindowsFormsApplication1, and then choose the OK button.
Visual Studio creates a solution for your program. A solution acts as a container for all of the projects and files needed by your program.
4. Visual Studio opens an interface. The interface contains three windows: a main window, Solution Explorer, and the Properties window. which is shown below.
You can also display windows by using menu commands. On the menu bar, choose View, Properties Window or Solution Explorer.
5. On the menu bar, choose File, Save All .
1. Use one of the following methods to run your program.
1. Choose the F5 key.
2. On the menu bar, choose Debug, Start Debugging.
3. On the toolbar, choose the Start Debugging button, which appears as follows.
Start Debugging toolbar button
2. Visual Studio runs your program, and a window called Form1 appears. The following diagram shows the program you just built. The program is running, and you will soon add to it.
Windows Form Application program running
3. Go back to the Visual Studio integrated development environment (IDE), and look at the new toolbar. Additional buttons appear on the toolbar when you run a program. These buttons let you do things like stop and start your program, and help you track down any errors (bugs) it may have. For this example, we're just using it to start and stop the program.
4. Use one of the following methods to stop your program.
1. On the toolbar, choose the Stop Debugging button.
2. On the menu bar, choose Debug, Stop Debugging.
3. Choose the X button in the upper corner of the Form1 window.