dcsimg
December 3, 2016
Hot Topics:

Beginning Objects in VB - Part 1

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

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 , and select VB, you will see a list (on the left) of all the standard controls in your toolbox.

Just try clicking on TextBox. See, recognise some of those methods and properties? (I sure hope so :)


Click here for a larger image.

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



Comment and Contribute

 


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

 

 


Enterprise Development Update

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

Sitemap | Contact Us

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