TcxCanvas.Lock Method
Forbids other threads to draw on the canvas until an Unlock procedure call.
Declaration
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