Platforms to show: All Mac Windows Linux Cross-Platform
Back to WindowsMonitorMBS class.
WindowsMonitorMBS.AllMonitors as WindowsMonitorMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Windows | MBS Win Plugin | 11.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns an array with an entry for each monitor connected to this computer.
See also:
Some examples using this method:
WindowsMonitorMBS.AllMonitors(monitors() as WindowsMonitorMBS) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Windows | MBS Win Plugin | 11.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns the number of monitors found and sets the monitor objects in the array.
if the array is too short, you get the first ubound(monitors)+1 fonts set there.
See also:
WindowsMonitorMBS.MonitorFromPoint(x as Integer, y as Integer, flags as Integer = 0) as WindowsMonitorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Windows | MBS Win Plugin | 11.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
x and y: The point of interest in virtual-screen coordinates.
Flags: Determines the function's return value if the point is not contained within any display monitor.
This parameter can be one of the following values.
Value | Meaning |
kDefaultToNearest | Returns a handle to the display monitor that is nearest to the point. |
kDefaultToNull | Returns nil. |
kDefaultToPrimary | Returns a handle to the primary display monitor. |
If the point is contained by a display monitor, the return value is that display monitor.
If the point is not contained by a display monitor, the return value depends on the value of flags.
WindowsMonitorMBS.MonitorFromRect(left as Integer, top as Integer, width as Integer, height as Integer, flags as Integer = 0) as WindowsMonitorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Windows | MBS Win Plugin | 11.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
left, top, width, height: The rectangle of interest in virtual-screen coordinates.
Flags: Determines the function's return value if the rectangle does not intersect any display monitor.
This parameter can be one of the following values.
Value | Meaning |
kDefaultToNearest | Returns a handle to the display monitor that is nearest to the rectangle. |
kDefaultToNull | Returns nil. |
kDefaultToPrimary | Returns a handle to the primary display monitor. |
If the rectangle intersects one or more display monitor rectangles, the return value is the display monitor that has the largest area of intersection with the rectangle.
If the rectangle does not intersect a display monitor, the return value depends on the value of Flags.
WindowsMonitorMBS.MonitorFromWindow(win as DesktopWindow, flags as integer = 0) as WindowsMonitorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Windows | MBS Win Plugin | 22.0 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
win: The window of interest.
Flags: Determines the function's return value if the window does not intersect any display monitor.
This parameter can be one of the following values:
Value | Meaning |
kDefaultToNearest | Returns the display monitor that is nearest to the window. |
kDefaultToNull | Returns nil. |
kDefaultToPrimary | Returns the primary display monitor. |
If the window intersects one or more display monitor rectangles, the return value is the display monitor that has the largest area of intersection with the window.
If the window does not intersect a display monitor, the return value depends on the value of Flags.
If the window is currently minimized, MonitorFromWindow uses the rectangle of the window before it was minimized.
See also:
WindowsMonitorMBS.MonitorFromWindow(win as window, flags as Integer = 0) as WindowsMonitorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Windows | MBS Win Plugin | 11.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop only |
win: The window of interest.
Flags: Determines the function's return value if the window does not intersect any display monitor.
This parameter can be one of the following values:
Value | Meaning |
kDefaultToNearest | Returns the display monitor that is nearest to the window. |
kDefaultToNull | Returns nil. |
kDefaultToPrimary | Returns the primary display monitor. |
If the window intersects one or more display monitor rectangles, the return value is the display monitor that has the largest area of intersection with the window.
If the window does not intersect a display monitor, the return value depends on the value of Flags.
If the window is currently minimized, MonitorFromWindow uses the rectangle of the window before it was minimized.
See also:
WindowsMonitorMBS.MonitorFromWindow(WindowHandle as Integer, flags as Integer = 0) as WindowsMonitorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Windows | MBS Win Plugin | 11.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
WindowHandle: A handle to the window of interest.
Flags: Determines the function's return value if the window does not intersect any display monitor.
This parameter can be one of the following values:
Value | Meaning |
kDefaultToNearest | Returns the display monitor that is nearest to the window. |
kDefaultToNull | Returns nil. |
kDefaultToPrimary | Returns the primary display monitor. |
If the window intersects one or more display monitor rectangles, the return value is the display monitor that has the largest area of intersection with the window.
If the window does not intersect a display monitor, the return value depends on the value of Flags.
If the window is currently minimized, MonitorFromWindow uses the rectangle of the window before it was minimized.
See also:
The items on this page are in the following plugins: MBS Win Plugin.