GH_WindowsFormUtil

public sealed class GH_WindowsFormUtil
Exposes some static (Shared) utility functions for positioning custom windows.

Methods

CenterFormOnCursor

#
public static void CenterFormOnCursor(Form F, bool limitToScreen)
Positions a Form so that it is centered around the cursor
F (Form)The Form to adjust
limitToScreen (bool)If True, the Form won't be allowed to extend beyond the limits of the screen containing the cursor.

CenterFormOnCursor

#
public static void CenterFormOnCursor(Window F, bool limitToScreen)
Positions a Form so that it is centered around the cursor
F (Window)The Form to adjust
limitToScreen (bool)If True, the Form won't be allowed to extend beyond the limits of the screen containing the cursor.

CenterFormOnEditor

#
public static void CenterFormOnEditor(Form F, bool limitToScreen)
Positions a Form so that it is centered on the active editor. If the editor doesn't exist or is hidden, the form will be centered on the screen instead.
F (Form)The Form to adjust
limitToScreen (bool)If True, the Form won't be allowed to extend beyond the limits of the screen containing the cursor.

CenterFormOnEditor

#
public static void CenterFormOnEditor(Window F, bool limitToScreen)
Positions a Form so that it is centered on the active editor. If the editor doesn't exist or is hidden, the form will be centered on the screen instead.
F (Window)The Form to adjust
limitToScreen (bool)If True, the Form won't be allowed to extend beyond the limits of the screen containing the cursor.

CenterFormOnScreen

#
public static void CenterFormOnScreen(Form F, bool limitToScreen)
Positions a Form so that it is centered on the current screen. The current screen being defined as the screen containing the cursor.
F (Form)The Form to adjust
limitToScreen (bool)If True, the Form won't be allowed to extend beyond the limits of the active screen.

CenterFormOnScreen

#
public static void CenterFormOnScreen(Window F, bool limitToScreen)
Positions a Form so that it is centered on the current screen. The current screen being defined as the screen containing the cursor.
F (Window)The Form to adjust
limitToScreen (bool)If True, the Form won't be allowed to extend beyond the limits of the active screen.

CenterFormOnWindow

#
public static void CenterFormOnWindow(Form F, Form parentWindow, bool limitToScreen)
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.
F (Form)The Form to adjust
parentWindow (Form)
limitToScreen (bool)If True, the Form won't be allowed to extend beyond the limits of the screen containing the cursor.

CenterFormOnWindow

#
public static void CenterFormOnWindow(Window F, Window parentWindow, bool limitToScreen)
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.
F (Window)The Form to adjust
parentWindow (Window)
limitToScreen (bool)If True, the Form won't be allowed to extend beyond the limits of the screen containing the cursor.