편집

다음을 통해 공유


Form.CenterToScreen Method

Definition

Centers the form on the current screen.

protected:
 void CenterToScreen();
protected void CenterToScreen ();
member this.CenterToScreen : unit -> unit
Protected Sub CenterToScreen ()

Remarks

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

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

  1. The Owner property of the form.

  2. The HWND owner of the form.

  3. The screen that currently has the mouse cursor.

Applies to

See also