Correct, I have previously read examples of periodically checking if the
Locked Desktop is loaded, such articles I have looked into are:
http://gethelp.devx.com/techtips/nt_pro/10_minute_solutions/10minNT0701.asp
I was personally unable to get the above solution to work correctly. Rather
you can use WndProc to check for the WM_SYSCOMMAND SC_SCREENSAVE messages,
however this will only work if the Window is currently active [not suitable
for many applications].
A suitable solution would be to create a Hook for such WM_GETMESSAGE
SC_SCREENSAVE messages. However I have posted my issues regarding a VB.NET
Hook under "Subject: Screensaver Event WM_GETMESSAGE Hook"
It would also be possible to load the screensaver timeout values [using
Windows.Management / WMI only Win2K and above] you could then create Hooks
for the Keyboard and Mouse events and operate the same as a screensaver,
using the same timeout. This is rather reinventing the wheel as you should
be able to hook the screensaver messages directly.
I have also read that hooking keyboard events can get you into trouble with
various virus scanning packages, so this also may not be the optimal solution.
I am also looking into a solution to capture the Windows acreensaver,
however I have yet to come up with an optimal solution within VB.NET
All help is appreciated and thank you in advance.