Beginning Objects in VB - Part 1
Is it a bird? Is it a plane? No, it's an object! (Sorry for those of you who never watched superman :)
Objects are things that you can program with, things that make programming easier. They contain a set of methods and properties that allow you to make the object do certain things without actually having to look at the objects code. For example, you have probably used the following statement many times:
Text1.Text = ""
Remeber that? Well, what you are doing is setting the property Text, of the text box object Text1 to equal nothing.
See, objects are really easy, you've been using them ever since that first "Hello World!" program you wrote!
In fact, all the controls you see on your VB toolbox are all objects. For a better look at objects, either press F2 or click View, Object Browser. This nifty little window allows you to see all the properties and methods of the objects currently loaded.
If you click on the combo box that currently contains
Just try clicking on TextBox. See, recognise some of those methods and properties? (I sure hope so :)
Here's what we've done so far:
- Example of the Textbox object
- Realised how simple objects can be (yes, you have really :)
- Taken a look inside the object browser
Right, lets find out where you get other objects from >>
Page 2 of 5