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

# TWidgetSet.MonitorFromWindow

Finds the monitor covering most of a window.

## Declaration

Source position: winapih.inc line 202

`public function TWidgetSet.MonitorFromWindow(`
`hWnd: HWND;`
`dwFlags: DWord`
`):HMONITOR; virtual;`

## Arguments

`hWnd` |  | The window handle.
`dwFlags` |  | How coordinates outside any monitor are handled, see MonitorFromPoint.Result.

## Function result

The monitor handle, see MonitorFromPoint.Result.