|This Registry edit should prevent programs from stealing focus:|
Open the Registry and go to HKEY_CURRENT_USER\Control Panel.
Select the Desktop key under Control Panel.
Locate and double-click on the ForegroundLockTimeout DWORD.
In the Edit DWORD Value window that appears, set the Value data: field to 30d40 As Hexadecimal
Click OK and then close Registry Editor.
Restart the computer