Detecting if screen saver running in XP

S

steve

Hi All

Using VB net 2005 Professional how can I detect when the windows screen
saver starts running


Regards
Steve
 
P

Peter Huang [MSFT]

Hi

Based on my research, we need to P/Invoke into Win32 API OpenDesktop to
determine if a desktop is running.
How To Determine Whether a Screen Saver Is Running on Windows NT
http://support.microsoft.com/kb/q150785/

Here is a link about how to call OpenDesktop in C#
http://www.thecodeproject.com/csharp/CsDesktopSwitching.asp

The OpenDesktop API
http://pinvoke.net/default.aspx/user32.OpenDesktop

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Cor Ligthert [MVP]

Steve,

In fact is VB Net not made for this. You are in an application, that is not
meant to intervent user settings.

You can bring yourself in big trouble additing this in your program, by
instance when a user has a all his passwords on screen from his accounts and
assumes that the password secured screensaver starts in 30 seconds and he
(after doing some simple things not at the screen) leaves the room for 2
hours.

Just my thought,

Cor
 
S

steve

Hi Cor

I don't want to interfere with the screensaver, just detect when it runs to
go and do something else

Regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top