|
Objects, Events, Actions, Methods & PropertiesIn 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. ObjectsYou have already used objects. A table, form, textbox, label are all objects. Basically all visual components of any Windows application are objects.
EventsWindows 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. ActionsActions 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. MethodsThe 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. PropertiesObjects 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:
However, there are properties that are shared among different types of objects. For Example:
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.
|