08-08-2006 08:25 AM
08-08-2006 08:50 AM
08-08-2006 09:20 AM
08-08-2006 09:31 AM
08-08-2006 09:40 AM
08-08-2006 10:08 AM
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
05-29-2014 01:44 PM
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 SystemParametersInfoA
in 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 SetCursorPos
function 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,