Monday, March 19, 2007

The Focus Thief Solution

Courtesy of co-worker, ioexcept:

"When you start a compile (or whatever) and you tab over to your HTML editor, email (another application) and you start writing an email (start to type in general) when all of a sudden … JBuilder jumps up and steal focus and 15 characters get typed into your code. This has annoyed me forever. I use MSPowerTools but as soon as the OS wants focus it resets the value. I found a nifty little setting that can prevent this from happening. Hope it works for all as well."

From the article:

http://xphelpandsupport.mvps.org/how_do_i_prevent_applications_fr.htm


For safety reasons it is always advisable to backup the registry before you start editing it. While there are numerous third party application that will do this for you, i.e., ERUNT, you can just as easily backup the registry using Windows XP.

1/ Click the Start button
2/ From the Start Menu click Run
3/ In the Run dialogue box type regedit
4/ When the registry window opens navigate to the following Registry key:
HKEY_CURRENT_USER/ControlPanel­/Desktop
5/ Click on the Desktop option and then look down the list on the right
for the following:
foregroundlocktimeout
6/ The right hand list is divided into three sections - Name Type and
data.
7/ Look in the Data section and check that the following is present:

0x00030d40 (200000)

8/ If this data is present then the Prevent applications from stealing focus option is enabled.
9/ If you have something different then proceed as follows:
10/ Right click on the ForegroundLockTimeout option and select Modify
11/ The Edit DWORD value box opens
12/ Make sure there is a green dot next to the hexadecimal option in the Base box
13/ Now in the Value data box type: 30d40 (that's thirty followed by d
then followed by 40)
14/ Click the OK button
15/ Your entry should now read:

ForegroundLockTimeout REG_DWORD 0x00030d40 (200000)

16/ Now close regedit and reboot your machine

No comments: