* Christof's sample code Declare Long CreateThreadWithObject in DMult.DLL ; String lpszClass, ; String lpszMethod, ; Object oRef, ; Long @lpdwThreadId Declare CloseHandle in Win32API LONG Local lnHandle, lnThreadID lnThreadID = 0 lnHandle = CreateThreadWithObject( ; Strconv("sample.Server"+Chr(0),5), ; Strconv("Main"+Chr(0),5), ; _VFP, ; @lnThreadID ; ) CloseHandle(m.lnHandle) * How to do this: do while .t. If background_thread_finished wait window 'background thread is finished' exit endif enddoCyril