function TryLock: Boolean;
bool __fastcall TryLock();
Locks the canvas if it is currently unlocked.
Call TryLock to prevent other threads from writing on the surface of the canvas until the Unlock method is called. Unlike calls to the Lock method, which nest so that every call to Lock must be matched with a subsequent call to Unlock, TryLock need only be matched by a call to Unlock, if the canvas was not already locked.