VB.net Notes, setting properties in vb.net 2005
VB.net Notes, setting properties in vb.net 2005
There are three ways for setting properties to windows forms and its controls.
1. Using the Visual Designer
2. Programatically
3. Using Visual Inheritance
Using the Visual Designer to set Windows Form Properties
The properties of the Widows properties can be edited in the properties window visually. Both the
inherited properties and also those added in the current class can be edited using the property
window. If this window is not visible,it can be selected from view menu.
End Class
Inheritance allows you to derive one class from another class. Visual Basic provides a facility by
which, while deriving a class from another class, you can also inherit the visual aspects of the
class.
To derive a form from a Form1 which will inherit all aspects of Form1, including the controls on
the form. Let us create a new project VisualInheritance and add a form Form1 to it. Now add a
button botton1 to the form. Now click on the Build menu and click on Build VisualInheritance.
This will enable the form to be available for being inherited.
Now right click on the project and you choose Add Inherited Form. You will see a window named
inheritance picker. Choose the form Form1 in the window. The new inherited form will have the
controls that were placed on the base form Form1.