Difference between revisions of "Designing Forms in Visual Studio"
(→Visual Basic Forms and Controls) |
(→Visual Basic Forms and Controls) |
||
Line 7: | Line 7: | ||
When a new ''Windows Application'' project is created in Visual Studio the first object you will see is a form. Typically it will appear in the design area as follows: | When a new ''Windows Application'' project is created in Visual Studio the first object you will see is a form. Typically it will appear in the design area as follows: | ||
− | [[Image: | + | [[Image:visual_studio_new_form.jpg| Blank Visual Studio Form]] |
Controls are added to the form using the Toolbox. The Toolbox is usually accessed by clicking on the ''Toolbox'' tab to the left of the Visual Studio main window. The Toolbox can be pinned in place so that it no longer auto-hides by clicking on the push pin in the title bar. It can also be detached and allowed to float anywhere on the desktop by clicking and dragging on the title bar after applying the push pin. When detached, the Toolbox appears as follows: | Controls are added to the form using the Toolbox. The Toolbox is usually accessed by clicking on the ''Toolbox'' tab to the left of the Visual Studio main window. The Toolbox can be pinned in place so that it no longer auto-hides by clicking on the push pin in the title bar. It can also be detached and allowed to float anywhere on the desktop by clicking and dragging on the title bar after applying the push pin. When detached, the Toolbox appears as follows: | ||
[[Image:visual_studio_toolbox.jpg| Visual Studio Toolbox]] | [[Image:visual_studio_toolbox.jpg| Visual Studio Toolbox]] |
Revision as of 14:29, 20 July 2007
The primary purpose of Visual Basic is the development of graphical Windows applications. Given this fact, it is not surprising that an important part of developing with Visual Basic involves the design of Windows Forms. In this chapter of Visual Basic Essentials we will cover in great detail the design of Forms using Visual Studio.
Visual Basic Forms and Controls
The form object is essentially a container for holding the controls that allow the user to interact with an application. Controls are individual objects such as Buttons and TextBoxes. In Visual Basic and Forms we looked at the many options for configuring a Windows Form. We have also looked briefly at adding controls to a form in earlier chapters. In this chapter, however, we will take a much closer look at the steps involved in laying out controls on a Form in Visual Studio.
When a new Windows Application project is created in Visual Studio the first object you will see is a form. Typically it will appear in the design area as follows:
Controls are added to the form using the Toolbox. The Toolbox is usually accessed by clicking on the Toolbox tab to the left of the Visual Studio main window. The Toolbox can be pinned in place so that it no longer auto-hides by clicking on the push pin in the title bar. It can also be detached and allowed to float anywhere on the desktop by clicking and dragging on the title bar after applying the push pin. When detached, the Toolbox appears as follows: