Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activate other apps
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01409215
Message ID:
01409435
Views:
46
>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.

Thanks a lot, this explains many topics on this problem.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform