Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Highlight a minimized App
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00697567
Message ID:
00697766
Vues:
14
>George, I've advanced a little bit but am still stuck !!
>
>I've set up a .prg as follows:
>------------------------------------
>* ShowWind
>*
>Declare Integer FindWindow in Win32API ;
> String @lpClassName,String @lpWindowName
>
>lcApplicationTitle = "cmd.exe"
>lnHWnd = Findwindow(0,@lcApplicationTitle)
>wait window 'Windows handle for cmd.exe = ' + Str(lnHWnd)
>
>Declare Integer ShowWindow in Win32API ;
> Integer hwnd, Integer nCmdShow
> * lnhWnd is the Window Title
> * Restore it to its last size and position
>= ShowWindow(lnHWnd,9)
>-------------------------------------
>
>I also have (just for testing) a Cmd.exe minimized
>If I Do ShowWind, it seems to run without an error, but does not 'Bring Forward' the cmd.exe window, which is what I am trying to do.
>
>Any ideas of where I am going wrong ?
>
>Regards,
>
Gerard,

It's probably a combination of the version of Windows plus the show command value. Here are the defined constants from Winuser.h. I think that if you play around with the second parameter, you can get the result you're look for.
#define SW_NORMAL           1
#define SW_SHOWMINIMIZED    2
#define SW_SHOWMAXIMIZED    3
#define SW_MAXIMIZE         3
#define SW_SHOWNOACTIVATE   4
#define SW_SHOW             5
#define SW_MINIMIZE         6
#define SW_SHOWMINNOACTIVE  7
#define SW_SHOWNA           8
#define SW_RESTORE          9
#define SW_SHOWDEFAULT      10
#define SW_FORCEMINIMIZE    11
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform