I had ForegroundLockoutTimeout set to the default: 200000 -- 200 seconds - Heat your lunch and the problem might change??!!
Using timers is just bad programming MS!!
It all started when double click focus - most annoying - started appearing in programs due to multithreading issues.
Anyway, I have a VB.net program I wrote, and it was getting bigger and taking a while to load.
Thought I would be nice, and put up a splash screen.
After running my program, before the splash screen was added, Alt-F4, correctly, would exit my program.
After the splash screen was added, which took owner ship of the desktop, then disappeared as it got overwritten by my application, as it should
my program did not have focus (for 200 seconds!!) and the Alt-F4 offered to do shutdown!! wtf??
Try running regedit. It sits in the back ground, as do some
HKEY_CURRENT_USER\Control Panel\Desktop\ForegroundLockoutTimeout = 0 for me.
I made two .reg files, one to set to zero, and one to restore it.
You need to logout and back in for it to take effect.
And then during testing, if my test/program/think time exceeded 200 seconds, then it looked like I had made a mistake, then it sometimes worked again.
Bloody obscure secret timers!!
I spent a lot more than 200 seconds solving my problems, which should never have existed, if VB.net splash screen was implemented correctly.
All comments, good bad and otherwise appreciated.
---------contents of .reg file to set it to zero, and my saved value. I always put xxx
so I can easily find my changes.
Windows Registry Editor Version 5.00