>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