System.Windows.Forms.Form.CenterToScreen Method

Centers the form on the current screen.

Syntax

protected void CenterToScreen ()

Remarks

Do not call this directly from your code. Instead, set the Form.StartPosition property to FormStartPosition.CenterScreen.

The Form.CenterToScreen method uses the following priority list to determine the screen used to center the form:

[The 'ordered' type of list has not been implemented in the ECMA stylesheet.]

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0