Visual Basic Reference

Visual Studio 6.0

Parent Property

See Also    Example    Applies To

Returns the form, object, or collection that contains a control or another object or collection.



The object placeholder represents an object expression that evaluates to an object in the Applies To list.


Use the Parent property to access the properties, methods, or controls of an object's parent.  For example:

MyButton.Parent.MousePointer = 4

The Parent property is useful in an application in which you pass objects as arguments. For example, you could pass a control variable to a general procedure in a module, and use the Parent property to access its parent form.

There is no relationship between the Parent property and the MDIChild property. There is, however, a parent-child relationship between an MDIForm object and any Form object that has its MDIChild property set to True.