Skip to main content
Pie
ra0

TcxCanvas.Unlock Method

Allows other threads to draw on the canvas after a Lock procedure call.

Declaration

procedure Unlock;

Remarks

Multiple threads of execution in an application can interfere with each other when drawing on the canvas. Call the Lock procedure to enter a critical section, so no other thread can draw on the canvas until an Unlock procedure call. Ensure that every Lock call is followed by an Unlock call to leave a critical section, even if an exception occurs.

Note

The RestoreDC procedure calls the Unlock procedure internally to unlock the canvas whose device context is restored.

See Also