February 17, 2019
Hot Topics:

Beginning Objects in VB - Part 1

  • November 20, 2002
  • By Sam Huggill
  • Send Email »
  • More Articles »

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

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date