procedure TMyThread.PushTheButton begin
procedure TMyThread.Execute; begin
Synchronize waits for the main thread to enter the message loop and then executes the passed method.
Note: Because Synchronize uses a message loop, it does not work in console applications. For console applications, use other mechanisms, such as critical sections, to protect access to VCL objects.
Was this article helpful?
What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.