473,790 Members | 3,265 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting ScreenSaver


I'm trying to set the user's screensaver in the .NET world...

In Win32 I could use a combination of setting the screen saver name via the
registry and then setting the time and active status using
SystemParameter sInfo. And the system would use the new settings.

Now that I'm trying to do it in .NET, I found that SystemParameter sInfo does
not exist. I also found I can detect when the screensaver settings have
been changed, but what I cannot find out is how to cause the system to know
that the screensaver settings have changed...

Anyone have any ideas?

--
Chris Burr
cb***@kcc.com

Jul 21 '05 #1
4 2201
You still can use those features through P/Invoke.

Add namespace System.Runtime. InteropServices in your code and then declare
[DllImport("user 32", CharSet=CharSet .Auto)]
unsafe public static extern short SystemParameter sInfo (int uiAction, int
uiParam, int* pvParam, int fWinIni);
HTH
Shishir Kumar Mishra
Agni Software (P) Ltd.
www.agnisoft.com

"Christophe r Burr" <cb***@kcc.co m> wrote in message
news:%2******** **********@TK2M SFTNGP11.phx.gb l...

I'm trying to set the user's screensaver in the .NET world...

In Win32 I could use a combination of setting the screen saver name via the registry and then setting the time and active status using
SystemParameter sInfo. And the system would use the new settings.

Now that I'm trying to do it in .NET, I found that SystemParameter sInfo does not exist. I also found I can detect when the screensaver settings have
been changed, but what I cannot find out is how to cause the system to know that the screensaver settings have changed...

Anyone have any ideas?

--
Chris Burr
cb***@kcc.com

Jul 21 '05 #2
Yea, was just hoping that I could avoid going to unmanaged code.

--
Chris Burr
cb***@kcc.com
"Shishir Kumar Mishra" <sh*****@agniso ft.com> wrote in message
news:uX******** ******@TK2MSFTN GP10.phx.gbl...
You still can use those features through P/Invoke.

Add namespace System.Runtime. InteropServices in your code and then declare [DllImport("user 32", CharSet=CharSet .Auto)]
unsafe public static extern short SystemParameter sInfo (int uiAction, int
uiParam, int* pvParam, int fWinIni);
HTH
Shishir Kumar Mishra
Agni Software (P) Ltd.
www.agnisoft.com

"Christophe r Burr" <cb***@kcc.co m> wrote in message
news:%2******** **********@TK2M SFTNGP11.phx.gb l...

I'm trying to set the user's screensaver in the .NET world...

In Win32 I could use a combination of setting the screen saver name via

the
registry and then setting the time and active status using
SystemParameter sInfo. And the system would use the new settings.

Now that I'm trying to do it in .NET, I found that SystemParameter sInfo

does
not exist. I also found I can detect when the screensaver settings have
been changed, but what I cannot find out is how to cause the system to

know
that the screensaver settings have changed...

Anyone have any ideas?

--
Chris Burr
cb***@kcc.com


Jul 21 '05 #3
On Fri, 30 Jan 2004 07:17:18 -0600, Christopher Burr <cb***@kcc.co m> wrote:
Yea, was just hoping that I could avoid going to unmanaged code.


And what's the problem? Use the registry and make it up through it!

--
.... blood, sugar, sex, magic ...
CIA = Caught In Action programmer
Jul 21 '05 #4
Only problem then is that the effects don't take place until the next login
=(

--
Chris Burr
cb***@kcc.com
"Maniaque |CIA|" <cape[a]fromru[dot]com> wrote in message
news:op******** ******@msnews.m icrosoft.com...
On Fri, 30 Jan 2004 07:17:18 -0600, Christopher Burr <cb***@kcc.co m> wrote:
Yea, was just hoping that I could avoid going to unmanaged code.


And what's the problem? Use the registry and make it up through it!

--
... blood, sugar, sex, magic ...
CIA = Caught In Action programmer

Jul 21 '05 #5

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

Similar topics

1
6659
by: klappnase | last post by:
Hello everyone, does anyone know a way to stop the screensaver under linux from starting up while a certain process is running? I need this because I experience a memory leak while recording wav-files every time the screensaver starts. It is a Tkinter application, btw. Any help would be very appreciated. Thanks
0
4183
by: Luke | last post by:
I am trying to capture an event when the screensaver starts. I have code working on Windows XP etc when the Password/Welcome Screen is enabled . Using the Fast User Switching Notifications. However I am unable to detect the screensaver starting when the screensaver password option is disabled. When using the WndProc Overrides I am unable to capture the screensaver event unless the application is active . Thank you in advance for any...
2
8572
by: DanielB | last post by:
Does anyone know what the command line argumentto launch a screensaver's options/configuration dialog is on Windows XP Pro? From most of the example source code I can find on the web, it would seem to be '/c' but that does not seem to work for the screensaver I have written. I've tested my code and if '/c' is the first argument then the options dialog is launched but Windows XP does not seem to be supplying the '/c' argument when I...
0
1626
by: Paul Smith | last post by:
I have been given an unusual task to create a Windows Service to do something periodically to make the screensaver timer reset. We have a general policy of locking computers automatically after 10 minutes of inactivity. This windows service would be used on some machines to prevent the lock from occurring every 10 minutes. I have tried to reposition the mouse pointer with the Cursor class in a service, but it does not work -- always...
4
5112
by: Paul Smith | last post by:
I have been given an unusual task to create a Windows Service to do something periodically to make the screensaver timer reset. We have a general policy of locking computers automatically after 10 minutes of inactivity. This windows service would be used on some machines to prevent the lock from occurring every 10 minutes. I have tried to reposition the mouse pointer with the Cursor class in a service, but it does not work -- always...
1
2632
by: DanielB | last post by:
Does anyone know what the command line argumentto launch a screensaver's options/configuration dialog is on Windows XP Pro? From most of the example source code I can find on the web, it would seem to be '/c' but that does not seem to work for the screensaver I have written. I've tested my code and if '/c' is the first argument then the options dialog is launched but Windows XP does not seem to be supplying the '/c' argument when I...
4
5505
by: Simon Mercer | last post by:
I have been trying to build a screensaver that will connect to a database and display specific data depending on the user that is logged in. I have managed to get a simple data access screensaver to work, however, i can't get the application to work with some prebuilt assemblies i have. Also, when the screensaver is running under the windows screensaver settings it also will not access the config file. Any pointers would be greatly...
3
5661
by: Ron Nanko | last post by:
Hi, I'm trying to setup a screensaver via a C# application. What I currently do is this: unsafe public static extern short SystemParametersInfo (int uiAction, int uiParam, int* pvParam, int fWinIni); .... try
4
342
by: Christopher Burr | last post by:
I'm trying to set the user's screensaver in the .NET world... In Win32 I could use a combination of setting the screen saver name via the registry and then setting the time and active status using SystemParametersInfo. And the system would use the new settings. Now that I'm trying to do it in .NET, I found that SystemParametersInfo does not exist. I also found I can detect when the screensaver settings have been changed, but what I...
0
9666
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10201
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9987
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5552
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4100
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
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.