Lesson 1
Home Up Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5

ASCII table

Assignment 1

Objects, Events, Actions, Methods & Properties

In the first Unit you have reviewed what you did in Grade 11. So you should be comfortable with creating Tables, Queries, Forms and Reports. Study will now shift to writing Visual Basic Code that will accompany Forms, Reports and be entered into Modules as general procedures.

Objects

You have already used objects. A table, form, textbox, label are all objects. Basically all visual components of any Windows application are objects.

 

u2less1.jpg (27653 bytes)

 

 

 

 

 

 

 

 

 

 

 

 

Events

Windows is the operating system that controls the interaction of input, output devices and certain control processes of the computer. When the user moves the mouse, clicks the mouse, presses a key or the printer finishes a print job, Windows treats these processed as an Event. Windows passes the information of the event occurring to your program. You may decide to write code to respond to the event or not. The code you write for each event is what makes up the Action.

Actions

Actions are responses to Windows events occurring. The you, the programmer, must develop the code that makes up the Action. A great deal of this course will be spent learning how to code the actions.

Methods

The actions that are pre-coded into the object to make the object perform a task. For example, the List object has a method called Clear that will remove all lines of text that is in the list portion of the control.

Properties

Objects have properties that give them characteristics that make them appear differently. Textboxes do not look the same as a Command Button because of the different properties each type of object has.

For Example:

The textbox has a property called Text that displays strings, or accepts text from the user, in the white portion of the object. The command button has text on the face of the button. This is the Caption property of the command button.

However, there are properties that are shared among different types of objects.

For Example:

All objects have one property that is shared, this is the important Name property. The name property is used to distinguish each object when writing code. You as a programmer will always give each object you create a name. Other properties that are shared among objects is the Height and Width properties. Most visual objects have these properties.

When an object is first created it has been given certain property values. These first values are called Default Property Values. You, the programmer, may change these properties while you are designing your application. This is called Design Time property changes. You may also write code that changes properties while the program is running. This is called Run Time property changes.

Note that there are some properties that may only be changed at design time of run time. For example, the Name property may only be changed at design time.

Assignment