Gets the form that the container control is assigned to.
Syntax
| Visual Basic (Declaration) | |
|---|
Public ReadOnly Property ParentForm As System.Windows.Forms.Form |
| C# | |
|---|
public System.Windows.Forms.Form ParentForm {get;} |
Property Value
The
System.Windows.Forms.Form that the container control is assigned to. This property will return null if the control is hosted inside of Internet Explorer or in another hosting context where there is no parent form.
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also