Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check if VFP is running from Word ??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00160586
Message ID:
00160800
Vues:
31
>>Hi,
>>
>>When in Word, I just want to know if VFP is running. I have tried to DECLARE FindWindowA and use it, but for it to work I need to specify the class of the main FoxPro window. When looking from another program the class is supposed to be 'FOX_400001' as I am using VFP3b, but this name doesn't do the trick.
>>
>>Is there some other was to find out if VFP is running or does anyone know the name the class of the FoxPro main window??
>>
>>
>>Any help appreciated...
>>
>>
>Hi Klas,
>
>If you pass a null string to FindWindow() as the class name all classes match. In this case, you should pass the caption of the window you're looking for. This, unfortunately, means that the caption must match the parameter exactly, including case. With windows with dynamic title text bars, this can be a problem.
>
>Try downloading my Is_Run32() function from the Win32 and other APIs section, here at the UT. Perhaps you can translate that into a VB script and use that.
>
>I highly discourage the use of class names with FindWindow(). VFP 3.0's are different from 5.0's and 6.0's are different from both.
>
>hth,

Thanks for you efforts,

I don't have a problem using FindWindow from VFP as I do not, as you said, have to specify the class. In VBA in Word on the other hand, it seems that the class have to be specified to make it work.

The has to be some way to find out if an application as running as well as finding out if a window exists. Isn't there?
(using VFP 3.0 for Win & Mac)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform