Grasshopper API
GH_WindowsFormUtilCenterFormOnWindow 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)

public static void CenterFormOnWindow( Form F, Form parentWindow, bool limitToScreen )
Public Shared Sub CenterFormOnWindow ( F As Form, parentWindow As Form, limitToScreen As Boolean )
Parameters
- F
- Type: System.Windows.FormsForm
The Form to adjust - parentWindow
- Type: System.Windows.FormsForm
- limitToScreen
- Type: SystemBoolean
If True, the Form won't be allowed to extend beyond the limits of the screen containing the cursor.
