473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Detecting if screen saver running in XP

Hi All

Using VB net 2005 Professional how can I detect when the windows screen
saver starts running
Regards
Steve
Nov 23 '05 #1
4 2598
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...pSwitching.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.

Nov 23 '05 #2
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
Nov 23 '05 #3
Hi Cor

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

Regards
Steve
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
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

Nov 23 '05 #4
"steve" <ga*****@newsgroups.nospam> schrieb:
Using VB net 2005 Professional how can I detect when the windows screen
saver starts running


<URL:http://dotnet.mvps.org/dotnet/samples/operatingsystem/ScreensaverStart.zip>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anthony | last post by:
In C++ you can detect the screensaver state by using something like: BOOL b=SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, NULL, &bOn, FALSE); Is there an equivalent method that I can use in...
2
by: HumptyDumpty | last post by:
Does anyone know if there is a problem with re-enabling the Screen Saver after it has been disabled programmatically. I am using the SystemParametersInfo function within User32.dll, and have...
12
by: Rob | last post by:
Is there a way that VB can know when the operating system goes into screen save mode? I have continuous polling I wish to pause while in screen save mode. And likewise to wake back up when the...
3
by: James Mc | last post by:
I need some help creating a screensaver in VB.NET How do I detect a mouse movement while the screen saver is running, then close the screen saver? Thanks JamesMc
5
by: Kevin Buchan | last post by:
How can I tell if the system is 'idle', or the screen saver is running, or the machine is locked? I am writing an application that could really benefit from knowing this information. During...
0
by: Jeffery Tyree | last post by:
I have a machine that will be used to demo some Excel spreadsheets at a convention. Because I did not author the spreadsheets and attendees will be allowed to play with the spreadsheets, I needed...
4
by: =?Utf-8?B?SmltIE9ybXNiZWU=?= | last post by:
Hopefully my solution will help others. I have a MacBook Pro on which I am running WindowsXP Home Edition. It is running totally separate from the Mac OS. I have to reboot to switch between OS's....
3
by: KK | last post by:
Dear All I want to prevent the screen saver getting activated when my application is running. I have the following code, but still screen saver is activated. What corrections I should make to...
0
by: rehanrana | last post by:
I built application in VB6, my application appear in system tray, when I double click on icon of my application, it run screen saver, my screen saver shows images and news. Screen saver...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.