Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Window handle of a form
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00085566
Message ID:
00086918
Views:
26
>>Is it possible to return the handle of a form?
>>GetActiveWindow and GetForegroundWindow (in User32) only returns handle to the main FoxPro window (the same value as MainHwnd() in FoxTools).
>
>To get the window handle of a FoxPro form, you can do the following after loading the FOXTOOLS.FLL library:
>
>
>* Get the whandle from the form's caption
>lnwhandle = _WFindTitl(TheForm.Caption)
>IF lnwhandle > 0
> * Convert the whandle to hWnd
> lnhWnd = _WhTohWnd(lnwhandle)
>ENDIF
>
>
>You can find the documentation on these (as well as other) functions in the Extended Foxtools Help file, available for downloading from the Files/Coding, Syntax & Commands section.
>
George,

Works great...as long as the window you want is a *form*. If you want the whandle of an open PRG editing window or open method editing window, this technique seems to return 0 for the whandle every time.

Am I doing something stupid (my normal mode) or should I be using some other technique for this?
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform