Skip to main content
Pie
ra0

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCanvas.Lock Method

In This Article

Forbids other threads to draw on the canvas until an Unlock procedure call.

#Declaration

Delphi
procedure Lock;

#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 an Unlock call follows every Lock call, even if an exception occurs.

Note

The SaveDC procedure calls the Lock procedure internally to prevent other threads from interaction with the canvas whose device context has changed.

See Also