Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Activate other apps
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Divers
Thread ID:
01409215
Message ID:
01409433
Vues:
64
Hi Naomi,

>Can you please elaborate on that?

Absolutely.

In Windows 9x/NT, any application could call SetForegroundWindow for any other window. So you could happily type an email in outlook when some invisible VB 6 application brings Messenger to the front and what you type gets send to some random contact.

Microsoft didn't like this idea especially in the context of security issues. So they limited SetForegroundWindow. Only the currently active application can bring another window in the fore ground. If an application calls the API function that is sitting in the background and the user is currently not working with it, then SetForegroundWindow will only cause the target window to blink instead of moving it to the foreground.


that means, SetForegroundWindow is good if the user is working with your application and you need to move a window such as WinWord to the foreground to let the user work in Word. However, once this is done, only Word can bring your application back to the front. Your application can't sit somewhere and wait for the user to finish the document and then move itself to the foreground.

If you try this, though, you'll notice that this behavior isn't particularly consistent. Sometimes the window is activated, even from a background application, sometimes it just blinks.
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform