MonitorFromWindow (user32)
Last changed: -24.12.194.220

.
Summary

C# Constants

const int MONITOR_DEFAULTTONULL = 0;

const int MONITOR_DEFAULTTOPRIMARY = 1;

const int MONITOR_DEFAULTTONEAREST = 2;

C# Signature:

[DllImport("user32.dll")]
static extern IntPtr MonitorFromWindow(IntPtr hwnd, uint dwFlags);

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

The System.Windows.Forms.Screen class contains all you might need to know about multiple monitors. The SystemInformation class also gives some information about available monitors.

Documentation