When running some programs (i.e. Microsoft Access 2007 and Tinker to name two), the programs appear to lose focus to the task bar in Windows 7. The symptoms are as follows: 1) program window flashes (for Microsoft Access it happens only with the file open form) and the icon for the program on the task bar inexplicably scrolls to the right and back with each flash. When this is occurring, it is nearly impossible to select an Access file to open with the Open... dialog or play to play the game Tinker.
Setting HKEY_CURRENT_USER\CONTROL_PANEL\DESKTOP\ForegroundLockTimeout to equal 30d40 seemed to resolve a similar issue with Minesweeper, but not the other programs mentioned above.
One more item to note: the issue appears to be user account specific.