Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows Handle API Call
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00450756
Message ID:
00450777
Views:
31
>>>Is there a foxpro function or an API call then will return the windows handle of my current running VFP form of class ?
>>>
>>>Thanks
>>>Stephen J. Hunt
>>>Admit Computer Services Inc.
>>
>>You can use Foxtools to retrieve the window handle of a VFP form. After issuing the SET LIBRARY command, lnhWnd = _WhTohWnd(_WFindTitl(< Caption >)) where < Caption > is the caption of the form of interest.
>
>Hey George,
> I think I remember hearing that the hWnd is going to be available as a property of the form in 7.0, right? How cool is that?
>
>M.

As I understand it, that's correct. VFP forms will have (in the next version) an hWnd property representing the form's window handle. The above technique works fine if there isn't another form with the same caption. If there is, you have to add some additional code to make sure that the caption is unique, get the proper window handle, then change it. Having the window handle as a property not only elminiates the need for using Foxtools, but having to deal with this potential problem as well. So, it's definitely cool.< g >
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform