Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxtools 'MainHWND' Function and Windows API
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00790131
Message ID:
00791013
Views:
25
>Hi Matt,
>
>
>* handle of main FoxPro window (_screen)
>DECLARE INTEGER GetActiveWindow IN user32
>? GetActiveWindow()
>
>* handle of a window with keyboard focus
>DECLARE INTEGER GetFocus IN user32
>? GetFocus()
>
>
>GetActiveWindow always returns FoxPro main window handle. For GetFocus it is different. It may be a variety of windows: main window, command window, active MODIFY PROGRAM window, active form, even active ActiveX control.

No, it won't always return the FoxPro main window handle. If VFP is not the active window when the code is run, then the window handle will be that of the window that is active. Since Win32 relies on pre-emptive multi-tasking, this is a possibility.
George

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

Click here to load this message in the networking platform