473,549 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Invoke Screen Saver

How do I invoke the current screen saver with C#?

Where did you find the information on how to do it?

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

Nov 16 '05 #1
3 2342
You can start any screen saver from the command line like this:
start C:\WINDOWS\syst em32\ssflwbox.s cr /s

The current screen saver can be found in the registry:
HKEY_CURRENT_US ER\Control Panel\Desktop

As for starting an exe in C#:
Process myProcess = Process.Start(S creenSaverPath) ;

So if you combine all those in you code you should be able to
invoke the current screen saver.

"Thom Little" <th**@tlanet.ne t> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
How do I invoke the current screen saver with C#?

Nov 16 '05 #2
Thank yo for the lead. It is now working and I am reading the values
out of the Registry to control it.

I would like to be able to specify ...

rkScreenSaver.S etValue( "ScreenSaveActi ve", "0" );

... to disable the screensaver but I am prevented from writing to the
Registry.

Do you have an idea on what I need to wrote to the Registry?

BTW ... your message was deleted from the major Microsoft newsgroup for
some reaswon.

... Thom
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3
Hi Thom,

I found your further concern of change the registry value has been posted
in a new post in this group.

I have added a reply to you in that new post, please follow up there, I
will help you.

Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 16 '05 #4

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

Similar topics

2
2504
by: Card.Starzinger | last post by:
Hi! I need help to simulate programmatically user interaction on WinNT 4.0, to avoid screen saver activation. I try with key injection event. SendInput API and keybd_event API work correctly with Win2000 and WinXP system. Screen saver don't start.
3
290
by: Thom Little | last post by:
How do I invoke the current screen saver with C#? Where did you find the information on how to do it? -- -- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd. --
2
2831
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 been successful in disabling the Screen Saver, but it does not work for re-enabling. The only way I can re-activate it is to re-apply the settings...
1
2251
by: Daniel | last post by:
Hi all, i have a doubt related to the screen saver ability. After developing the asp.net webform, can i add screen saver ability in this webform? which means, i open the asp.net webform, after a few minutes the web form will act as a screen saver. In the screen, it only show summary of each product in real time(which mean the webform is...
0
3259
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 a way to periodically restore the original versions. In addition to the "always-on-top click this button to reset demo" application I wrote, I...
2
4907
by: Claire | last post by:
Hi, Our software runs on a XP system attached to a touch screen monitor and smartcard USB reader. We run our own simple corporate screen saver. When the screen is touched the screen saver vanishes, but when a user inserts a smartcard (we're polling for inserts) the screen saver doesn't vanish. Is there any way we can awaken the system and...
1
2368
by: ashwiniappajigowda | last post by:
Hi, I have an simple MFC dialog based application. On launch of that application 'Password protected screen saver' is not getting activated after the screen saver timeout. If 'On resume, password protect' option unchecked, I am getting the Screen saver. Application not generating any of the keyboard or any user events to
3
5753
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 prevent screen saver running to the following code. public class MainForm : System.Windows.Forms.Form { private static readonly int SC_SCREENSAVE =...
0
1253
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 functionality is that when user press F2 key, my screen saver open news detail in browser. But the problem is that when screen saver stop (close), browser also...
0
7518
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7446
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7715
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7469
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7808
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1935
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.