GefApplication.GetMonitorWorkingRect (method)

Gets the working rectangle of a monitor in virtual screen coordinates.
Syntax: Boolean = object.GetMonitorWorkingRect ( MonitorIndex, left, top, right, bottom )
Parameters:
MonitorIndex As long - A one based monitor index. This corresponds the numbers seen on the "Settings" page of the "Display Properties".
left As long* -
top As long* -
right As long* -
bottom As long* -
Description: Gets the working rectangle of a monitor in virtual screen coordinates. The working rectangle is the rectangle of the monitor not occupied by taskbars, docked windows, and docked tool bars. Returns "True" if the monitor exists, and is attached to the desktop. Otherwise it returns "False."

Examples

Sub Application_GetMonitorRect()
  Dim oCimApp as GefApplication
  Dim left as long
  Dim top as long
  Dim right as long
  Dim bottom as long
  Set oCimApp = CimGetScreen.Application
  If oCimApp.GetMonitorWorkingRect(2, left, top, right, bottom) Then
    MsgBox "Monitor 2 was has a working rectangle, left: " & left & " top: " & top & " right:" & right & " bottom: " & bottom
  Else
    MsgBox "Monitor 2 was not found attached to desktop"
  End If
End Sub
See Also: GetMonitorRect , MonitorCount