Control.TopLevelControl Property
.NET Framework 3.0
Gets the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Assembly: System.Windows.Forms (in system.windows.forms.dll)
/** @property */ public Control get_TopLevelControl ()
public function get TopLevelControl () : Control
Not applicable.
Property Value
The Control that represents the top-level control that contains the current control.The top-level control is defined as the parent control that is not parented by another Windows Forms control. Typically, this is the outermost Form that the control is contained in. For example, if the control is contained on an MDI child Form, then the top-level control is the Multiple Document Interface (MDI) parent Form. If the control is not parented on a Form, this property will return a null reference (Nothing in Visual Basic).
- UIPermission for all windows to get this property value. Associated enumeration: UIPermissionWindow.AllWindows
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: