Beginning Objects in VB - Part 1
Good question. Imagine this - every time you wanted to use a text box control, you had to add a usercontrol, copy and paste some code, draw a few controls on it, rename them all, test it and then load it onto your form! That would be ridiculous.
Lucky for us there is a way to get around this. We can make objects that contain all their own code and they only let you see a few important bits in the object browser.
This saves ages of time programming, and means that you can easily distribute your control (or whatever object it may be).
Although Visual Basic is not a completely object orientated language (that would have to include geeky things like inheritance and other complicated stuff) it does allow us to use objects in our code.
Now that you know why you should use them, and you've seen some examples of objects in VB (the Textbox and RichTextBox controls in case you had already forgotten), you may now be wanting to build your own (or you might not be wanting to build your own, but that's what we're going to do next so ha!)
Page 4 of 5