Upravit

Sdílet prostřednictvím


Screen.FromControl(Control) Method

Definition

Retrieves a Screen for the display that contains the largest portion of the specified control.

public:
 static System::Windows::Forms::Screen ^ FromControl(System::Windows::Forms::Control ^ control);
public static System.Windows.Forms.Screen FromControl (System.Windows.Forms.Control control);
static member FromControl : System.Windows.Forms.Control -> System.Windows.Forms.Screen
Public Shared Function FromControl (control As Control) As Screen

Parameters

control
Control

A Control for which to retrieve a Screen.

Returns

A Screen for the display that contains the largest region of the specified control. In multiple display environments where no display contains the control, the display closest to the specified control is returned.

Applies to