Visual Basic is often described as being an object based language as it has some, but not all, of the characteristics of an object oriented language. The following are some of these characteristics.
Data in a program is represented by objects. These objects can be as simple as a variable in a normal programming language but normally ar a bit more complex. They will often represent something that we can percieve in reality (although they can also be used to represent something abstract). An example of an object could be an item such as a box on a form that will be filled in by a user during the execution of the program.
A particular type of object is defined by the properties it has. For instance a box on a form will have an X and Y co-ordinate specifying its location, a width and a height and many other attributes that must be set in order to describe a particular example of the object.
While an object type could be regarded as a theoretical thing, when running a program there may be many actual instances of a particular object (such as a few labels on a form). These actual instances must be given names to distinguish them from each other (so name is one property that every object must have).
You may change the property of any standard object by using the properties window and changing the value associated with the property in the table. This will only effect the value of this property when the program starts.
After a program starts, any property of an object may be changed by using an assignment statement (LET statement):
TextBox1.value = 34
Note the syntax used: objectname.property =
Most objects have a default property (the most commonly used one). If the property is not specified in an assignment statement, then this one is assumed. (So textBox1 = 34 would have the same effect as the above as value is the default property of a textbox)
This is the phrase used for the style of program that consists of many smaller programs that are initiated when things happen (events). These events are usually associated with particular objects (e.g. opening a form, clicking a button)
In Visual Basic, a sequence of instructions that is activated when a particular event happens to a particular instance of an object, is stored as a SUB. The name the SUB is given is the name of the object followed by an underscore followed by the type of event. For example; SUB TextBox1_Change( ) would be the name of the sequence of instructions invoked if the contents of TextBox1 changed at any time during the running of the program.