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:
00160681
Vues:
25
>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,
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform