steal or transfer focus

  • Thread starter Mickey Ferguson
  • Start date

M

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?
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top