Jump to content

How to prevent the Screensaver from starting


Recommended Posts

Hello all,

I would like to have my application generate some sort of windows event that will stop the screensaver from starting up. I have tried generating mouse movements but this does not seems to work. Any ideas?

You can programmatically disable the Screen Saver by calling the SystemParametersInfoA function from the User32.dll. Look this function up on MSDN.

post-311-1159975498.png?width=400

Note all parameters are of type U8.

Regards,

-Khalid

Link to comment
You can programmatically disable the Screen Saver by calling the SystemParametersInfoA function from the User32.dll. Look this function up on MSDN.

post-311-1159975498.png?width=400

Note all parameters are of type U8.

Regards,

-Khalid

1- I can't make it to work, could you send me a VI?

2- Where did you get the 17 = SPI_SETSCREENSAVEACTIVE?

Link to comment
Hello all,

I would like to have my application generate some sort of windows event that will stop the screensaver from starting up. I have tried generating mouse movements but this does not seems to work. Any ideas?

I would suggest to look into the .NET framework, i be;ieve you will find something there. Or you could use the attached VI to change the timeout of the screen saver to a maximum of 9999 minutes.

Download File:post-731-1160055219.vi

Link to comment

I am finding that none of the proposed methods will work in my case. The screen saver in question is apparently network administered and designed not to be foiled. It's purpose is to force a login prompt if the computer is not used for 1800 seconds. The screen saver settings appear to be locked. I have even tried some registry hacks but they do not stick. I had assume there would be some way to fake user activity but ordinary mouse and keyboard events do not work.

Link to comment
...is apparently network administered and designed not to be foiled.

...and there is your answer! Looks like need to talk to your administrator :) Depending on company policies, admins are usually not keen to completely remove the station locking, but if given a good reason (it screws up my experiment because the data acquisition stops and I loose my data) they'll often help you out by increasing the time to the lock.

Link to comment
I am finding that none of the proposed methods will work in my case. The screen saver in question is apparently network administered and designed not to be foiled. It's purpose is to force a login prompt if the computer is not used for 1800 seconds. The screen saver settings appear to be locked. I have even tried some registry hacks but they do not stick. I had assume there would be some way to fake user activity but ordinary mouse and keyboard events do not work.

Hi Sachsm,

I asked the same question in this thread

http://forums.ni.com/ni/board/message?boar...d=114553#M52654

about three years ago. None of the posted replies worked for me but there maybe something there that can help you.

Ben

If I had a time machine and a license to kill....

There are two people I would chase down.

The person who decide that men should shave

and

the person who invented computer viruses.

Link to comment
I am finding that none of the proposed methods will work in my case. The screen saver in question is apparently network administered and designed not to be foiled. It's purpose is to force a login prompt if the computer is not used for 1800 seconds. The screen saver settings appear to be locked. I have even tried some registry hacks but they do not stick. I had assume there would be some way to fake user activity but ordinary mouse and keyboard events do not work.

We have the same problem in our company. These settings are usually controlled thru registry settings that are manipulated remotely. We wrote a some vbs code to defeat this practice. It uses the registry key: HKEY_CURRENT_USER\Control Panel\Desktop\screensaveactive",iScreenActive,"REG_SZ. Did you try this?

Andrew

Link to comment
  • 3 weeks later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.