At the end of the lesson, the students are expected to:
* To illustrate VB IDE
* To explore and handle the tools/ parts of Visual Basic workplace as well as the shortcut keys used * To enumerate and describe the different tools/ parts of Visual Basic environment * To manipulate VB IDE
* To use the tools in VB IDE correctly.
* To create a simple Windows-Based program
. Working in the Development Environment
Visual Basic development environment has different elements. When we start Visual Basic and select a project type, the graphical development environment appears. The following illustration shows some of the development environment’s elements.
Fig. 1.3 Visual Basic Environment
The VB IDE consists of several elements, namely;
This is a horizontal bar along the top of the screen. In VB, it displays the name of the project working on.
Provides all commands used for developing, maintaining and executing VB programs.
Comprised of pictures called icons that represent commonly used commands on the Menu Bar.
Contains the objects and controls that you can add/ insert to forms to create the user interface of your program. |
| Pointer| Used to interact with the controls on the form(i.e., resize them, move them, etc.). it is not a control| PictureBox| A control that displays images|
Label| A control that displays uneditable text to the user at run-time.| TextBox| A control for accepting user input. it can also display text.| Frame| A control for grouping other controls|
CommandButton| A control that represents a button. the user presses or click to initiate an action.| CheckBox| A control that provides the user to toggle choice| OptionButton| A “radio button”. It is used in groups where only one at a time can be true or on.| ListBox| A control that provides a list of items|
ComboBox| A control that provides a short list of items|
HScrollBar| A horizontal scroll bar|
VScrollBar| A vertical scroll bar|
Timer| A control that performs a task at programmer-specified interval. it is not visible to the user at runtime.| DriveListBox| A control for accessing the system disk drives(C:, A:,etc.)| DirListBox| A control for accessing the directories on a system.| FileListBox| A control for accessing files in a directory| Shape| A control for drawing circles, rectangles, squares or ellipses| Line| A control for drawing lines|
Image| A control for displaying images. It does not provide as many capabilities as a PictureBox| Data| A control for connecting to a database|
OLE| A control for interacting with other window applications|
In VB, a form is a window used in your program/ application. For each form in your application, VB provides a Form Designer window at design time which contains the form and all of the controls that you place on the form.
This is where we design/ create the user-interface for the program.
Project Explorer Window
Lists the collection of files used to build an application. The collection of files in VB is called a project. It contains three buttons, namely View Code, View Object and Toggle Folders. View Code displays a window for writing Visual Basic codes; View Object displays the form or simply double-click on the form name; Toggle Folders toggles the Forms folder.
List the property settings for the selected form or control that can be modified while the program is being edited. A property describes a characteristic of an object, such as size, caption or color.
Code Editor Window
Also known as Code window. It contains 2 drop-down lists at the top of the...