Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return focus to the previous window
Message
 
 
À
21/09/2004 05:36:01
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00944426
Message ID:
00944904
Vues:
22
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform