Information générale
Catégorie:
Fonctions Windows API
Titre:
How to check for another application running?
I have a client who needs to see if another is application is running on a workstation at the same time as a custom built VFP app is running. For example, VFP application A is running and it wants to see if Excel is running. Is there a way to query the OS via a WinAPI call to see if Excel is indeed running and if possible, get an object handle to Excel so that it can be "controlled" by the VFP application.
An outline of the logic is this:
Is Excel running?
....Yes, then do this: oExcel = handle returned by the call to the WinAPI
....No, then do this: oExcel = CreateObject( 'Excel.Application' )
Then code procedes on using the "oExcel" object.
Can this be done?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement