Routines (alphabetical) > Object Classes > Miscellaneous Object Classes > IDLsysMonitorInfo::GetPrimaryMonitorIndex

# IDLsysMonitorInfo::GetPrimaryMonitorIndex

Syntax | Return Value | Arguments | Keywords | Version History

The IDLsysMonitorInfo::GetPrimaryMonitorIndex function method retrieves the index of the monitor that is considered the system’s primary monitor. This index can be used to index the arrays returned by other function methods in this class that return monitor information.

A monitor is considered primary if the system specifically designates it as the primary monitor. If no such designation is made, the monitor containing the desktop origin (0, 0) is considered the primary monitor. On UNIX systems that use multiple X Screens, the primary monitor is the one that is associated with the default Screen of the X Display connection.

## Syntax

Result = Obj->[IDLsysMonitorInfo::]GetPrimaryMonitorIndex()

## Return Value

Returns the index of the primary monitor as an integer, or -1 if there are no monitors available on the system, or if the DISPLAY_NAME property does not refer to a valid X server connection.

## Arguments

None

## Keywords

None

## Version History

6.3 | Introduced