About:

 
 


Core of the multi-monitor library, used to hold information and provide access to a single display device attached to the system.

 
     

 

Download:

 
 


Download library Version 1.1

 
     

 

Dependencies:

 
 

Display mode class

 
 

Rectangle class

 
     

 

Properties:

 
 

hMonitor

Access:
Get / Let

Description:
Monitor handle (HMONITOR) for the display device the object holds information about


 
 

DisplayName

Access:
Get

Description:
Display device name


 
 

DeviceString

Access:
Get

Description:
Display adapter name


 
 

DeviceID

Access:
Get

Description:
Plug and play device identifier


 
 

DeviceKey

Access:
Get

Description:
Reserved, but exposed for future use


 
 

PrimaryDisplay

Access:
Get

Description:
Specifies whether this is the primary display device


 
 

AttachedToDesktop

Access:
Get

Description:
Specifies whether this device it attached to the desktop


 
 

MirroringDriver

Access:
Get

Description:
Specifies whether this is a display mirroring pseudo-device


 
 

VGACompatible

Access:
Get

Description:
Specifies whether this device is running in VGA compatible mode


 
 

Removable

Access:
Get

Description:
Specifies whether this device is removable


 
 

ModeSpruned

Access:
Get

Description:
Specifies whether the display adapter has more modes than this device can support


 
 

WorkArea

Access:
Get

Description:
Returns a Rectangle object specifying the working area of this device in virtual screen coordinates


 
 

Area

Access:
Get

Description:
Returns a Rectangle object specifying the monitor area of this device in virtual screen coordinates


 
 

DisplayModeCount

Access:
Get

Description:
Returns the number of display modes compatible with this device


 
 

CurrentDisplayMode

Access:
Get

Description:
Returns a Display mode object containing information about the current display mode


 
 

RegistryDisplayMode

Access:
Get

Description:
Returns a Display mode object containing information about the display mode stored in the registry for this device


 
 

DisplayMode

Access:
Get

Description:
Returns a Display mode object for the requested display mode
Index must be between 0 and .DisplayModeCount-1 (inclusive)

 
     

 

Methods:

 
 

ReQuery()

Description:
Requests the object to re-query it's properties


 
 

SetDisplayMode()

Description:
Changes the display mode for this monitor

Parameters:

Name

Description

inMode

A Display mode object specifying information about the display mode to change to.

[inTestOnly]

Specifies whether the device should only be tested for support of the given display mode rather than switching to it.
By default this is set to False


Return:
Returns a enDisplayChangeResult value specifying the result of the display mode change or test.


 
 

MoveScreen()

Description:
Moves the display's position in virtual screen space

Parameters:

Name

Description

inX

Specifies the horizontal coordinate in relation to the origin of the current primary display

inY

Specifies the vertical coordinate in relation to the origin of the current primary display

[inTestOnly]

Specifies whether the device should only be tested for support of the given display mode rather than switching to it.
By default this is set to False


Return:
Returns a enDisplayChangeResult value specifying the result of the display mode change or test.


 
 

NewEnum()

Description:
Private function used to provide For ... Each access to the monitor object's Display modes

Return:
Returns the internal collection's enumerator object


 
 

DevInfFromMode()

Description:
Converts a Display mode object to a DevMode structure

Parameters:

Name

Description

inMode

The Display mode object to convert


Return:
A DevMode structure containing settings from the input object


 
 

GetDisplayMode()

Description:
Gets information about a specific display mode

Parameters:

Name

Description

inIdx

Index of the display mode to return


Return:
A Display mode object containing information about the requested mode


 
 

RectFromUDT()

Description:
Creates a Rectangle object based on a RectAPI structure

Parameters:

Name

Description

inUDT

RectAPI structure specifying desired coordinates


Return:
A Rectangle object containing the desired coordinates


 
 

TrimNull()

Description:
Trims a null-terminated string

Parameters:

Name

Description

inString

Input string to convert


Return:
Trimmed string


 
 

ClearInfo()

Description:
Clears all the internal information stored within the object


 
 

Class_Initialize()

Description:
Initialize event handler of the object


 
 

Class_Terminate()

Description:
Terminate event handler of the object

 
     

 

User defined types:

 
 

PointL

Description:
2D point API structure
POINT structure on the MSDN.


 
 

RectAPI

Description:
Rectangle API structure
RECT structure on the MSDN.


 
 

MonitorInfoEx

Description:
Extended monitor info API structure
MONITORINFOEX structure on the MSDN.


 
 

DisplayDevice

Description:
Display device API structure
DISPLAY_DEVICE structure on the MSDN.


 
 

DevMode

Description:
Device mode API structure
DEVMODE structure on the MSDN.

 
     

 

Enumerators:

 
 

enDisplayChangeResult

Description:
Specifies the result of a display mode change

Variables:

Name

Description

dcrBadDualView

Settings change was unsuccessful because the system is DualView capable.

dcrBadParam

An invalid parameter was passed in. This can include an invalid flag or combination of flags.

dcrBadFlags

An invalid set of flags was passed in.

dcrNotUpdated

Unable to write settings to the registry.

dcrBadMode

The graphics mode is not supported.

dcrFailed

The display driver failed the specified graphics mode.

dcrSuccessful

Settings change was successful

dcrRestart

The computer must be restarted for the graphics mode to work.

 
     

 

API:

 
 

GetMonitorInfoA

 
 

EnumDisplayDevicesA

 
 

ChangeDisplaySettingsExA

 
 

EnumDisplaySettingsExA

 
     

Back to multi-monitor library