Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return focus to the previous window
Message
From
22/09/2004 06:46:52
 
 
To
21/09/2004 05:36:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00944426
Message ID:
00944904
Views:
23
Hi.
Somehow the seccess of this procedure depends on where was the last mouse-click on the form.
Thank God my ultimate judges - the users decided they want the calculator minimized. So ThisForm.windowstate=1 was enough.
Thanks for the answer.
Kamil

>If the called window's application is in foreground then this should work:
>
>* API Declarations
>Declare Integer GetActiveWindow In Win32API
>Declare Integer GetWindow In Win32API Integer HWnd, Integer dflag
>Declare integer SetActiveWindow in win32API integer hWnd
>
>#define GW_HWNDNEXT         2
>#define GW_HWNDPREV         3
>
>SetActiveWindow(GetWindow(GetActiveWindow(), GW_HWNDPREV))
>Clear Dlls 'GetActiveWindow','GetWindow','SetActiveWindow'
>
Cetin
A moment of silence is our cosmic reset button.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform