The information in this article applies to:
SUMMARYThe purpose of this article is to summarize and clarify the information presented in the Visual Basic documentation regarding the use of the Procedure Attributes dialog. Specifically, it clarifies the expected behavior of the User Interface Default as it applies to the Properties window, and explains the difference between the Default Procedure ID and the User Interface Default settings. MORE INFORMATION
The Visual Basic Help states that the User Interface Default (UI Default)
"Determines which property is highlighted in the property browser ..." The
following steps describe the behavior of Visual Basic for UI Default
properties:
Step-by-Step Example
Difference Between Default Procedure ID and User Interface DefaultWhen you display the Procedure Attributes dialog and press the Advanced button, you will see a combo box titled "Procedure ID" and a check box with the description "User Interface Default." These fields serve two different purposes; the Procedure ID settings are for run-time and the User Interface Default is a design-time setting.The Default setting for Procedure ID is available for Properties or Methods, but not for Events. You may have only one Procedure specified as "Default" per component. What a default Procedure ID setting means is that the default method or property will be executed when no specific member is specified. For example, the following statement on the client form will cause the default method of the UserControl (in this case a Subroutine) to execute:
The following line of code will cause the default property of the control to be set to the string "This is my control," assuming the default property will accept one:
The User Interface Default setting is available for Events or Properties, but not for Methods. You can have one UI Default property and one UI Default event per component. The purpose of the UI Default for a property is to determine which property is displayed in the properties window at design-time when the control is selected or placed on a form, subject to the behavior discussed earlier in this article. The purpose of the UI Default for an event is to specify which event procedure should appear when you double-click on the control. This applies to the control when it is seated on a form, not to the control itself. NOTE: If you are changing User Interface Default properties and they don't seem to be taking effect, run the form and then go back into design mode and test again. The UI Defaults, particularly the event default that determines which event procedure is displayed when double-clicking, may not get refreshed until the form has been run. Additional query words: kbDSupport kbDSD kbVBp kbVBp500 kbVBp600 kbActiveX kbUsage
Keywords : kbGrpVB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |