Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preventing a second instance.
Message
De
29/08/2005 07:20:33
 
 
À
28/08/2005 14:40:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01001365
Message ID:
01044723
Vues:
28
When I run it, it sorta works, but if the first instance is minimised on the bottom toolbar it brings back the first instance with SCREEN ON ie so that the VFP desktop can be seen behind my app. (My app runs with SCREEN=OFF). I can avoid this by omitting the second parameter from the SHOWWINDOW function, and whilst the BringWindowToTop works fine in bringing the window to the top from behind other windows, it leaves my first instance of the application minimised on the toolbar if the user has minimised it. How can I get it to maximise without the SCREEN showing?

Check out the SetForegroundWindow function in MSDN:


The SetForegroundWindow function puts the thread that created the specified window into the foreground and activates the window. Keyboard input is directed to the window, and various visual cues are changed for the user. The system assigns a slightly higher priority to the thread that created the foreground window than it does to other threads.

Try using that instead of BringWindowToTop.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform