topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 23, 2024, 12:01 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - neilw20 [ switch to compact view ]

Pages: [1]
1
ProcessTamer / Re: ForegroundLockTimeout Value
« on: April 09, 2016, 09:57 AM »
My findings:
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 programs.

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.
Neil

---------contents of .reg file to set it to zero, and my saved value. I always put xxx   :D so I can easily find my changes.
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ForegroundLockoutTimeout"=dword:0
"ForegroundLockoutTimeoutWas00030d40xxx"=dword:00030d40
end ---------


Pages: [1]