>>>Hi all,
>>>
>>>Is the _vfp.hWnd the top-level window handle of a VFP application that can be seen from another VFP application? I use User32.IsWindow(hWnd_) but it returns 0, meaning: the window does not exist.
>>>
>>>Comments and feedback highly appreciated. TIA.
>>
>>The _VFP.hWnd is the window handle for the frame. I get back 1 when calling IsWindow with the _VFP.hWnd.
>
>My test is as follows:
>
>run myApp.exe from DOS.
>from within myApp.exe I strtofile(_vfp.Hwnd)
>
>from a VFP command window
>?IsWindow(theHwndValue)
>
I think that the problem may be in using STRTOFILE(). Try this
= STRTOFILE(TRANSFORM(_VFP.hWnd), 'myhwnd.txt')
hWind = VAL(FILETOSTR('myhwnd.txt'))
? IsWindow(hWnd)
George
Ubi caritas et amor, deus ibi est