Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleGive an ActiveX control a default property
Keywordsdefault, ActiveX, property
CategoriesTips and Tricks, ActiveX
 
A control's default property the value you get or set when you use the control without specifying a property. For example, a Label control's Caption property is its default property so the following two lines of code are equivalent (if Label1 is a Label control).

    Label1 = "Hello"
    Label1.Caption = "Hello"

To make a property the control's default property, double click the control to open it. Select the Tools menu's Procedure Attributes item and click the Advanced button to show this dialog. In the Name dropdown, select the property you want to use. In the Procedure ID dropdown, select "(Default)" and click OK.

 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated