>>>>Are you asking how to activate its window if any? If so I've to find my code that collects all processes and their related window handles but for that as I remember I needed to also create a FLL (VFP not supporting callback functions).
>>>>Cetin
>>>
>>>yes.
>>>
>>>but, why have I to go into the processes list if i have the semaphore liked to the process ?
>>>
>>>Why I cannot get the processId from the semaphore directly ?
>>>
>>>With a Atom i can found a simple solution ?
>>>
>>>thanks
>>>
>>>Fabio
>>
>>You might:) I don't know how at the moment and was saying what I've on my hand:)
>>I even didn't check the code I've written. Probably you're right you could directly go from there.
>>Cetin
>
>Thanks.
>As soon as I will have time I will try one solution.
>Fabio
BTW, I tried FindWindow in the past but it didn't work for me (well it was returning a window if application had one but there is nothing preventing a windows title and class to be the same as one unrelated window - for example if you've 2 VFP instances open you have 2 windows of the same class and title. I wasn't carefull enough to have titles unique enough to be differentiated).
WaitForSingleOject also fail with some applications (ie: WinWord).
Cetin