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

# TCanvas.SetHandle

Sets the value for the Handle property.

## Declaration

Source position: graphics.pp line 1085

`protected procedure TCanvas.SetHandle(`
`NewHandle: HDC`
`); virtual;`

## Arguments

`NewHandle` |  | New value for the property.

## Description

De-selects any existing handles in the class instance, and sets the new value for the property. Applies the anti-aliasing mode when the handle is valid. Updates the state flags for the canvas.

## See also

TCanvas.Handle |  | Handle (or device context) for the drawing surface.