LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

disable screen saver

Hi everybody!
One more screen saver question with a twist:
I don't mind the screen saver coming up. But I'm looking for a way to stop it programmatically (as my vi blows a rather nasty real-life horn, I would rather not have the user have to wave the mouse and wait for two seconds to oust the screen saver, but prefer to have the computer await the user [who comes running to the PC] ready-to-go).

Any ideas anybody?
Kind regards,
Severin
0 Kudos
Message 1 of 7
(4,596 Views)
Your statement seemed to imply you've asked a question about screen savers before, though I did a quick search and didn't find anything.

Just a dumb question: why do you want to go to the trouble of doing it programmatically? Why not just set up the computer so it doesn't run a screen saver in the first place? If you're running XP Pro you can even go so far as setting that up via Group Policy. That seems like a far easier solution.

However, you could try this:

http://forums.ni.com/ni/board/message?board.id=170&message.id=28698&requireLogin=False
0 Kudos
Message 2 of 7
(4,579 Views)
Thanks for your answer!
It's not a dumb question: I need the screen saver to... err... save the screen, since it's a CRT showing a rather static image. However, I might be better off by simply having the graphics adapter cut the signal after some time - like this the screen should come up in a split second. (Still it'd be neat to have the computer do it itself, but this is far better than using the screen saver.

Regards,
Severin
0 Kudos
Message 3 of 7
(4,573 Views)
Unless this is an old CRT, burn-in isn't really that much of an issue any more. With newer CRTs the screen saver is more of a way of getting a pretty display rather than "saving" the CRT.

While you could probably program the graphics adapter to cut the signal this isn't necessarily a good way to go considering that if your program crashes you'll never know since the screen will be essentially off. In this case, I suspect the only way to get the display back is to reboot or you may have to as far as turning the computer off and then back on.
0 Kudos
Message 4 of 7
(4,566 Views)
I may not have gotten my plan right: I just meant some simple OS-wide energy saving scheme (think Energy Star). Still, thanks for your clarification on CRTs!
0 Kudos
Message 5 of 7
(4,562 Views)

Try:

    Windows API Function Utilities (32-bit) for LabVIEW.

    http://sine.ni.com/apps/utf8/niepd_web_display.display_epd4?p_guid=B45EACE3EF4556A4E034080020E74861

 

George Zou

http://gtoolbox.yeah.net

 

George Zou
0 Kudos
Message 6 of 7
(4,557 Views)

Hi all,

 

I'm having the same issue.  I want the screen saver to kick on as part of a display package but turn off when a event occurs in the program.  I have tried multiple ways of doing this but am getting odd activity.

 

I have tried programatically moving/clicking the mouse.  I know this works because I see the cursor move when I create the event from an external controller.  The problem is when the screensaver is on, it doesn't kick off when I do the exact same thing.

 

I have also tried a programmed key stroke.  Again this doesn't kick the screen saver off.

 

Here is where I get confused.  In both of these cases, when I set the screensaver for say, 1 minute, and continue to generate the event.  It WILL prevent the screensaver from turning on.  But it won't wake the computer up once the screensaver is on.

 

I noticed the thread: http://digital.ni.com/public.nsf/allkb/C5EDD606E6083DA1862573010001A5BD

 

SOLUTION:

This will involve calling Windows functions from the User32.dll.  First, the power-off mode must be terminated in case a screensaver is running.  This is done using the SystemParametersInfoAin the User32.dll.  After giving the system a delay in order to respond, you may then move the mouse by specifying horizontal and vertical positions in pixel coordinates with the SetCursorPosfunction in the same library.

 

I used the code in the example and found that everything worked but the SystemParametersInfoA function.  I eliminated everything else (move mouse, and click) and gave it 1 second to respond. But nothing happens, the screensaver remains...

 

I turned on highlight execution and made sure that the function was actually called, just to be sure.

 

Any help on this issue would be great.

 

FYI..this is an executable program generated from Labview 2012SP2 on a windows 8.1 asus touch screen laptop.

 

Thank you,

0 Kudos
Message 7 of 7
(3,775 Views)