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

# TControl.UpdateMouseCursor

Changes the cursor shape to the value in the Cursor property.

## Declaration

Source position: controls.pp line 1495

`protected procedure TControl.UpdateMouseCursor(`
`X: Integer;`
`Y: Integer`
`);`

## Arguments

`X` |  | Not used in the method.
`Y` |  | Not used in the method.

## Description

UpdateMouseCursor is a method used to change the cursor shape displayed when the mouse is hovered over the control. No actions are performed in the method at design-time, or when the screen cursor already has a shape other than crDefault.

UpdateMouseCursor calls SetTempCursor to apply the value in the Cursor property to the Parent control.

UpdateMouseCursor is called from WMMouseMove after the mouse position has been captured, and before the OnMouseMove event handler is signalled.