Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Communicating with other VFP exe's
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00061459
Message ID:
00061712
Vues:
35
>>>Hi
>>>
>>> I have a main VFP exe program that also runs another different
>>>VFP exe program. How do I determine from the first program whether
>>>the second program is running or not. If it is running then I would
>>>like to maximize it rahter than running a second copy.
>>>
>>>Thanks Gary
>>
>>There is the solution!
>>
>>
>>**Can maximize a window
>>DECLARE INTEGER ShowWindow ;
>>IN WIN32API ;
>>	INTEGER  hWnd , ;
>>	INTEGER nState
>>
>>**get the window handle
>>DECLARE INTEGER FindWindow ;
>>IN WIN32API ;
>>	STRING cNull, ;
>>	STRING cWinName
>>
>>**place the window on top
>>DECLARE INTEGER BringWindowToTop ;
>>IN WIN32API ;
>>	INTEGER  hWnd
>>
>>*Sample code, it this case the window title = 'Calculatrice'
>>IF !FindWindow( 0, 'Calculatrice') > 0
>>	*Not find, do something...
>>ELSE
>>	*Find! Bring it to top and maximize it!
>>	=BringWindowToTop(FindWindow( 0, 'Calculatrice'))
>>	=ShowWindow(FindWindow( 0, 'Calculatrice'),1)
>>ENDIF	
>>
>>
>>
>>:0)
>
>Gerald
>
> Thanks for the code! I will try this. I love learning new things.
>Should I also include the Error code messages????
>
>Trez Bien merci

Yes, you can try it!
:0)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform