[Overview][Constants][Types][Procedures and functions][Variables][Index] | Reference for unit 'Mouse' (#rtl)

# PollMouseEvent

Query next mouse event. Do not wait if none available.

## Declaration

Source position: mouseh.inc line 99

`function PollMouseEvent(`
`var MouseEvent: TMouseEvent`
`):Boolean;`

## Description

PollMouseEvent checks whether a mouse event is available, and returns it in MouseEvent if one is found. The function result is True in that case. If no mouse event is pending, the function result is False, and the contents of MouseEvent is undefined.

Note that after a call to PollMouseEvent, the event should still be removed from the mouse event queue with a call to GetMouseEvent.

## Errors

None.

## See also

GetMouseEvent |  | Get next mouse event from the queue.
PutMouseEvent |  | Put a mouse event in the event queue.