HOWTO: Iterate Controls on a Form from a Property PageLast reviewed: March 18, 1997Article ID: Q161056 |
The information in this article applies to:
SUMMARYMicrosoft Visual Basic version 5.0 enables you to create custom property pages for user-defined ActiveX controls. These property pages can contain controls and fields that change the properties of the user-defined control. The property pages can also be extended to change properties of other controls that may be contained within the form where the user-defined control is located. The property page, by default, can only access public properties of the user-defined control for which it was written. However, by using the ParentControls collection and a Friend function, you can create a route through which you can expose the other controls contained within the parent form. The use of the Friend function enables components within the ActiveX control to use this function, while hiding it from use outside the immediate project. The ParentControls collection returns the objects within the parent container. This includes returning item(0) as a reference to the parent container.
MORE INFORMATIONTo enable a property page for a user-defined ActiveX control to gain access to the container form's set of controls, do the following:
'Custom' from the properties list to bring up the Property Page. REFERENCESMicrosoft Visual Basic Online Help Keywords: Friend, Extender
|
Additional query words: hidden private
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |