>>>Help-me Please!
>>>
>>>
>>>How we can get a handle to vfp's form?
>>
>>Hi Nilton,
>>
>>The foxtools library can do this. After setting the library:
>>lnwhandle = _WFindTitl(oForm.Caption)
>>* Convert to the window handle
>>lnhwnd = _WhTohWnd(lnwhandle)
>
>George
>
>But how to do it if the form is a VFP5 one with no caption. The reason I ask this is that in another VB program I could move a Titleless form(similar to a splash screen with no close, zoom etc and NO Title) using Win API as VB had a built in Fn to give the handle of the form.
>
>So it must be possible in the API to get a handle of the form (not _screen) but how, without the Title(Caption)??
>
Hi Bernard,
Steven Ruhl's GetFocus() API call might do this for you. However, the approach I would use might be a bit different than you'd expect. I'd create a custom property, say nhWnd and assign it a 0 value. In the form's GotFocus event, I'd check to see if it were empty, and if so, call GetFocus() and assign the property's value that way. A disclaimer here, however, I only tested this in VFP 6.0 (don't have access to 5.0 any longer). In 6.0, a form can be without a title bar, but still have a caption. I have no way to determine if that will impact the above.
Please let me know if this works.
George
Ubi caritas et amor, deus ibi est