[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'InterfaceBase' (#lcl)

# TWidgetSet.MonitorFromPoint

Finds a monitor from the screen coordinates.

## Declaration

Source position: winapih.inc line 200

`public function TWidgetSet.MonitorFromPoint(`
`ptScreenCoords: TPoint;`
`dwFlags: DWord`
`):HMONITOR; virtual;`

## Arguments

`ptScreenCoords` |  | The point in screen coordinates.
`dwFlags` |  | How coordinates outside any monitor are handled, see MonitorFromPoint.

## Function result

Gets the monitor handle, or a value derived from Flags.

## Description

The return value contains the handle for the monitor, or a value determined using Flags when a monitor does not apply.

MONITOR_DEFAULTTONEAREST
  The nearest monitor.
MONITOR_DEFAULTTONULL
  Zero.
MONITOR_DEFAULTTOPRIMARY
  The primary monitor.