HostWeb Forums » Microsoft Server Operating Systems » microsoft.public.win2000.developer » steal or transfer focus

Topic: steal or transfer focus

Reply | New Topic | This is SPAM | This is Offensive

Submitted: 3/6/2008 12:33:54 PM

By: Mickey Ferguson
I'm not sure if this is the right newsgroup. If it's not, and you can
recommend another microsoft.* newsgroup where I should post this, I would
appreciate it.

Everyone knows it's a capital offense for an application to steal focus.
Remember how mad you get when you're typing away in your document, with a
patch install going on in the background, and when the install completes,
and it pops up a dialog asking you to reboot. You don't notice the dialog
in time and happened to type an 'n' character that was intended for your
document. Instead, it is taken as a Reboot _N_ow, and your computer
reboots, losing huge amounts of work in the process. Well, there are many
other examples, but you get the idea.

What I want to be able to do, though, is for one application to GIVE (or
transfer) focus to another one. Say I've got AppA.exe and AppB.exe. They
play nicely together, and maybe even appear next to each other. Let's say
that AppA is running and has focus. User clicks a button on AppA, and we
want focus to transfer to AppB. We do NOT want AppB to flash, telling the
user it wants focus, we just want the focus there immediately. This isn't a
case of AppB trying to steal focus. AppA has the focus, and it wants to
"pass the baton" to AppB. Can this be done without having to modify the
HKEY_CurrentUser\Control Panel\Desktop : ForegroundLockTimeout value, which
affects every other application in the system?



Replies below ↓
Contents
Home
Forums
About Us
Contact Us
Web Hosting:
Hosting Providers
How to choose a name
What is a Hosting Provider
Hosting Types
Choosing the right plan
 
Search
 
Login to HostWeb.com
Email
Password
If you do not have an account with us yet, join now - it's FREE!