Datasheet

FIGURE 1 - 13
Each control you place on your form has its own distinct set
of properties. For example, in the Design view, select your
form. You ll see the Properties window adjust to display the
properties of Form1 (refer to Figure 1 - 14). This is the list of
properties associated with your form. If you want to limit how
small a user can reduce the display area of your form, then you
can now de ne this as a property.
For your sample, go to the Text property and change the
default of Form1 to Professional VB.NET. Once you have
accepted the property change, the new value is displayed as
the caption of your form. Later in this section, you ll set form
properties in code. You ll see that .NET properties are de ned
within your source fi le, unlike other environments where
properties you edit through the user interface are hidden in
some binary or proprietary portion of the project.
Now that you ve looked at the form s properties, open the code
associated with this fi le by either right - clicking Form1.vb in the
Solution Explorer and selecting Code view, or right - clicking
the form in the Design view and selecting View Code from the
pop - up menu.
The initial display of the form looks very simple. There is no
code in the
Form1.vb le. Visual Basic 2005 introduced a
capability called partial classes . Partial classes are covered
brie y in Chapter 2, and Visual Studio leverages them for the
code, which is generated as part of the user interface designer.
FIGURE 1 - 14
Project ProVB_VS2010
29
CH001.indd 29CH001.indd 29 4/5/10 11:56:46 AM4/5/10 11:56:46 AM