MonitorGetWorkArea

Checks if the specified monitor exists and optionally retrieves the bounding coordinates of its working area.

ActualN := MonitorGetWorkArea(N, &Left, &Top, &Right, &Bottom)

Parameters

N

Type: Integer

If omitted, the primary monitor will be used. Otherwise, specify the monitor number, between 1 and the number returned by MonitorGetCount.

&Left, &Top, &Right, &Bottom

Type: VarRef

If omitted, the corresponding value will not be stored. Otherwise, specify references to the output variables in which to store the bounding coordinates of the working area, in pixels.

Return Value

Type: Integer

This function returns the monitor number (the same as N unless N was omitted).

Error Handling

On failure, an exception is thrown and the output variables are not modified.

Remarks

The working area of a monitor excludes the area occupied by the taskbar and other registered desktop toolbars.

MonitorGet, SysGet, Monitor functions

Examples

See example #1 on the Monitor Functions page for a demonstration of this function.