The Visual Basic Integrated Development Environment

Preview:

Citation preview

The Visual Basic Integrated Development Environment

Visual Basic Startup Screen Main window Form window Project window (Project Explorer) Properties window Form layout window Toolbox

Visual Basic Objects All of the controls in the toolbox

are objects. The form is also an object.

Visual Basic Objects have properties events methods

Object Properties A property is a named attribute of

an object. used to change the behavior and

appearance of an object can be set at design time or with

code at run time frmFirst.BackColor = vbBlue

Object Events action taken by the object in response

to an event such as a mouse click or key press

an event procedure tells an object how to respond to an event

Example: Private Sub Form_Click()

lblNew.Caption = “You clicked the form!” End Sub

Object Methods code held by the object that

operate on the object’s data methods in Visual Basic are

predefined procedures frmFirst.PrintForm

The Code Window

Projects Every Visual Basic application is

defined and saved as a project. Each project contains a collection

of files such as forms or modules. Save all forms and modules

individually within the project. Save the project (.vbp extention)

Recommended