Datasheet

40
CHAPTER 1 VISUAL STUDIO 2010
ENHANCING A SAMPLE APPLICATION
To start enhancing the application, you are going to use the control Toolbox. Close the Form1.designer.vb
le and switch your display to the Form1.vb [Design] tab. The Toolbox window is available whenever a form
is in Design view. By default, the Toolbox, shown in Figure 1 - 23, is docked to the left side of Visual Studio
as a tab. When you click this tab, the control window expands, and you can drag controls onto your form.
Alternatively, if you have closed the Toolbox tab, you can go to the View menu and select Toolbox.
If you haven t set up the Toolbox to be permanently visible, it will slide out of the way and disappear whenever
focus is moved away from it. This helps maximize the available screen real estate. If you don t like this feature
and want the Toolbox to be permanently visible, just click the pushpin icon on the Toolbox s title bar.
The Toolbox contains literally dozens of standard controls, which are categorized so it s easier to fi nd them.
Figure 1 - 23 shows the result of dragging a
Button control from the Toolbox and depositing it on the form: a
new button displaying the text Button1. Adding another button would trigger the default naming and text
of Button2.
FIGURE 1 - 23
Before customizing the fi rst control added to this form, take a closer look at the Visual Studio Toolbox.
The tools are broken out by category, but this list of categories isn t static. Visual Studio 2010 Standard
and above editions enable you to create your own custom controls. When you create such controls, the IDE
will after they have been compiled automatically add them to the display when you are working in the
same solution as the controls. These would be local references to controls that become available within
the current solution.
Additionally, depending on whether you are working on a Web or a Windows Forms application, your list
of controls in the Toolbox will vary. Windows Forms has a set of controls that leverages the power of the
Windows operating system. Web applications, conversely, tend to have controls oriented to working in a
disconnected environment.
CH001.indd 40CH001.indd 40 4/5/10 11:56:54 AM4/5/10 11:56:54 AM