>>>>>I can find a program with findwindow.
>>>>>Is there an api to maximize the program that i find with findwindow?
>>>>>Thanks.
>>>>
>>>>The function you're looking for is ShowWindow(). Pass the window handle returned by FindWindow() and 3 (SW_MAXIMIZE).
>>>
>>>Thanks George for this info.
>>>I have try it.Its run perfect.
>>>I dont want that the user runs the same applicaton second time.
>>>Thanks again
>>
>>You're welcome. Please keep in mind, however, that FindWindow() is case sensitive and the title supplied must match exactly.
>>
>>Just a suggestion, you might want to use SW_RESTORE (9). Also look at IsIconic(), that'll tell you whether or not it's on the task bar. If not, then SetForegroundWindow() could be called to bring it to the top of the Z order.
>
>Yes SW_RESTORE is more fitt. But i dont know if i need IsIconic. While i havent a code like _screen.visible=.f. in my aplication. Is there an other way for the user to clear it from the taskbar?
>Altough i havent heard IsIconic.Maybe i need it another day.Thanks.
IsIconic() will tell you whether or not the application is minimized on the Windows task bar. If it returns 1, then it is and you should use ShowWindow(). If it returns 0, then use SetForegroundWindow().
George
Ubi caritas et amor, deus ibi est