Now that you have worked with existing objects and created your own objects, you will see a few ways to extend existing objects, giving them additional properties, methods, or events. Start by looking at how to create custom properties for existing objects.
One way to create a custom property for an existing object is to use the Tag property. The Tag property is only used when you write code to set the value and then use that value later for some specified purpose. For example, you might use the Tag property to hold a value and then retrieve that value at a later time.
As described earlier, when you create properties for your custom objects, you can also create properties for existing objects, using public variables. To do so, just add the public variable declaration to the class module of the existing object, such as an existing class for a form. Again, this is not the recommended way to create properties. As discussed previously, I do not recommend this approach for three primary reasons. First, you cannot manipulate the value because the property is set; second, you cannot create read-only and write-only properties; third, you cannot easily validate what is assigned to public variables. A better way to create properties, discussed next, does not have these drawbacks.
You can use the Property ...