0% found this document useful (0 votes)
60 views4 pages

Project Explorer, The Properties Window, The Immediate Window, Object Brower Notes

There are two main ways to add controls to a form - by dragging from the toolbox onto the form or by double clicking a control to add it. After adding controls, their properties can be set either in design time using the properties window or at runtime by writing code. Controls on the form can have their behavior specified by double clicking the control to access the code window and writing code.

Uploaded by

junaid Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views4 pages

Project Explorer, The Properties Window, The Immediate Window, Object Brower Notes

There are two main ways to add controls to a form - by dragging from the toolbox onto the form or by double clicking a control to add it. After adding controls, their properties can be set either in design time using the properties window or at runtime by writing code. Controls on the form can have their behavior specified by double clicking the control to access the code window and writing code.

Uploaded by

junaid Malik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

How to place controls on the form?

1. Select a control from Toolbox, click on form and drag until you have
got the shape of the control you want.
2. Alternatively, you may double-click any control to add to form.

After adding a control to the form, you need to set its property and then write
code for the control to work how you want.

There are two ways to set property


1. You can set property in Design Time from the Properties Window.
2. Or, you may wish to set property at run time by writing code.

Writing the Code for a Control

Simply double-click the control (which is on the form) to view the code window
and write code to specify how this control will work.
NOTE :
1. Pointer is not a control. Click this icon to select controls already on
the form.
2. All controls are object
3. Form is an object, but it is not a control.

The Properties Window

From properties window, you can set properties for controls.

(See in the Picture) 'Caption' is the property of the Form object.


'Form1' is the value of the property.

In the same way, 'Appearance' is the property. '1-3D' is the value.

In the Properties Window, notice the help information about the object. This
helps in learning new properties.
(See Picture) Help information for the 'Caption' property is shown.
The Project Explorer Window
Press Ctrl+R if this window is not showing.

The Project Explorer Window gives you a view of the modules or forms which
are contained in your VB application. You can switch from one form to another
or from one module to another from the Project Explorer Window. You can view
the code window of a particular form or module as well.

The Code Window


You need the Code Window to write code that will specify the behavior of the
forms and the objects. Remember that the Form is an object.

The Form Layout Window

The Form Layout Window shows where on the screen the form will be displayed
when the program will be executed. Simply drag on it so that the form appears
on the position where you want.

The Immediate Window


Press Ctrl+G to show the Immediate Window.
The Immediate Window helps in debugging your program by displaying the
current values of variables or expressions in a certain line of your code.

The Object Browser


Press F2 to show the Object Browser Window. It is very useful because you can
learn about all the methods, functions, properties and events of the objects. If
you want to know about any property, method, event, function etc, simply
search in the Object Browser.

You might also like