Thisform.MyProcess() can return .T. to determine that it is finished. Sorry, I called it YourProcess().
I think that PeekMessage() can pick message from Windows que and places it in structure and than back into the que unless your specify that you want it to be removed.
HTH,
Alex.
>>Yes, PeekMessage() is API function. You can try in Click methid following:
>>
>>do while NOT lResult
>> =PeekMessage(....) && with removal flag as one of the parameters
>> lResult = YourProcess()
>>enddo
>
>Can you explain more the use of PeekMessage() and lResult? I am reading the WIN32API help presently but it's difficult to see the use in relation to what I need.
MS,MCP