By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,775 Members | 1,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,775 IT Pros & Developers. It's quick & easy.

Stopping screen saver

P: n/a
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 stop the screen saver from
code please?

thank you
Jan 25 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Claire,
You could try using p/invoke to call SystemParametersInfo:

[DllImport("user32.dll", SetLastError = true)]
static extern bool SystemParametersInfo(uint uiAction, uint uiParam,
IntPtr pvParam, uint fWinIni);
public const int SPI_SETSCREENSAVEACTIVE = 0x0011;

Then call it like this:
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, IntPtr.Zero, 0);

Hope that helps,
John

Claire wrote:
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 stop the screen saver from
code please?

thank you
Jan 25 '07 #2

P: n/a
I found something. Sorry for bothering you

http://www.codeproject.com/csharp/Sc...verControl.asp
Jan 25 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.