To prevent applications from stealing the focus from the window you are working
  1. Start Regedit
  2. Go to HKEY_CURRENT_USER \ Control Panel \ Desktop
  3. Edit the key ForegroundLockTimeout
  4. Give it a value of 00030d40