GH_EtoUtilCenterFormOnWindow Method |
Positions a Form so that it is centered on the supplied window. If the window doesn't exist or is hidden,
the form will be centered on the screen instead.
Namespace:
Grasshopper.GUI
Assembly:
Grasshopper (in Grasshopper.dll)
Syntax public static void CenterFormOnWindow(
this Window F,
Window parentWindow,
bool limitToScreen
)
<ExtensionAttribute>
Public Shared Sub CenterFormOnWindow (
F As Window,
parentWindow As Window,
limitToScreen As Boolean
)
Parameters
- F
- Type: Window
The Form to adjust - parentWindow
- Type: Window
- limitToScreen
- Type: SystemBoolean
If True, the Form won't be allowed to extend beyond the limits of the screen containing the cursor.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Window. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also