Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ShowWindow
Message
De
23/10/1999 07:13:07
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00278675
Message ID:
00280397
Vues:
14
David,

Thanks for the reply. Both Ed and George's suggestion worked(Thanks). I am always trying to understand more...

Are you passing something back to the orignal copy of the app to trigger the code below or is it in the second copy?

What does the line external procedure mainhwnd do?

Thanks

>John,
>
>Here's what I use to bring the VFP app back on top if they try to launch another instance of the app:
>
>
if ( this.mlBringBackOnTop )
>
>   external procedure mainhwnd
>   SET LIBRARY TO "FOXTOOLS.FLL" additive
>   local lnHWND
>   lnHWND = mainhwnd()
>
>   if ( _screen.WindowState = 1 )
>      * this window is iconized so first we need to restore it
>
>      * Use the ShowWindow API call because we don't know whether to set WindowState to 0 or 2
>      * the API call does return the window to whatever state it was before it was iconized
>
>      declare integer ShowWindow in WIN32API integer, integer
>      #define SW_RESTORE 9
>
>      ShowWindow( lnHWND, SW_RESTORE )
>   endif
>
>   DECLARE INTEGER SetForegroundWindow IN WIN32API INTEGER
>
>   SetForegroundWindow( lnHWND )
>endif
>
>
>>I am using WIN32API to find out if the application is all ready loaded then using ShowWindow to show the window. I get inconsistant results on showing the window. Sometimes it is shown and sometimes it is only partialy painted. I have tried the following with 3, 5 and 6:
>>
>>

>>LPARAMETER lnHWND
>>
>>DECLARE INTEGER ShowWindow IN Win32API;
>> INTEGER hwnd, INTEGER dflag
>>
>>= ShowWindow(lnHWND, 3)
>>
>><\PRE>
>>
>>Does anyone know the syntax for ShowWindow to maximize the window and bring it to the top?
>>
>>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform