NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Screen.FromControl

Retrieves a Screen for the monitor that contains the largest region of the window of the control.

[Visual Basic]
Public Shared Function FromControl( _
   ByVal control As Control _
) As Screen
[C#]
public static Screen FromControl(
   Control control
);
[C++]
public: static Screen* FromControl(
   Control* control
);
[JScript]
public static function FromControl(
   control : Control
) : Screen;

Parameters

control
A Control for which to retrieve the monitor.

Return Value

A Screen for the monitor that contains the largest region of the specified control. If no monitor contains the control, then the monitor closest to the specified control is returned.

See Also

Screen Class | Screen Members | System.WinForms Namespace