Actually i am using this code and works ok, but i \'am wondering if is the correct way.
while WaitForSingleObject(MyThread.Handle, 0) = WAIT_TIMEOUT do App
The VCL TThread class has its own WaitFor() method that pumps the main message queue internally when called within the main thread context:
WaitFor()
MyThread.WaitFor; ShowMessage('i am done');