Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reopen application when minimized
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01116657
Message ID:
01232742
Vues:
17
>You need to check if the application is already running before
>launching it again, one easy way to do it; but not the best; is to check
>for the window title of you application with this code:
>
>LOCAL lnWindowHandle
>
>DECLARE INTEGER FindWindow IN WIN32API INTEGER,STRING
>DECLARE INTEGER BringWindowToTop IN WIN32API INTEGER
>
>lnWindowHandle = FindWindow(0,lcMyWindowTitle)
>
>IF lnWwindowHandle > 0 && App is runing bring it forward
> =BringWindowToTop(lnWindowHandle)
>ENDIF
>
>HTH
>

This doesn't seem to work with Excel, which was started by automation. I was using SetForegroundWindow and tried this one - with no avail.

UPDATE. But adding ShowWindow with normal right after seems to help.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform