LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

monitor on and off

Hi,

I'm trying to turn my monitor on and off in a labview program. I've almost got the solution, but with my code Labview generates an error when it executes the dll. Does anyone know why??
0 Kudos
Message 1 of 5
(3,476 Views)
Hi,

could you explain what you are trying to do?

I have seen that you are sending a Windows message to a Window where the front panel resides in.

What is the message 0x112 expressed in WM_ mnemonics?
Are you aware that the SendMessage will be a call going into another thread? The front panel can reside in another thread as the block diagram will be executed.

There is no documentation available what LV will do with Windows messages send to it.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 5
(3,476 Views)
Hello,

I'm trying to turn off a tft screen when nothing happens in my program and I want to turn it on when the user of the program should know something. I'm not very experienced with calling dll functions, so I copied some code from the internet and I've tried to combine it. The message 0x112 stands for WM_SYSCOMMAND. The message 0xF170 stands for SC_MONITORPOWER. I'm not sure I should send the message to the window where the front panel resides in, but I don't know where to send it to otherwise. If someone knows this, how do I get the window handler to it??

Thanx,

Boelens
0 Kudos
Message 3 of 5
(3,476 Views)
> I'm trying to turn off a tft screen when nothing happens in my program
> and I want to turn it on when the user of the program should know
> something. I'm not very experienced with calling dll functions, so I
> copied some code from the internet and I've tried to combine it. The
> message 0x112 stands for WM_SYSCOMMAND. The message 0xF170 stands for
> SC_MONITORPOWER. I'm not sure I should send the message to the window
> where the front panel resides in, but I don't know where to send it to
> otherwise. If someone knows this, how do I get the window handler to
> it??
>

When you send a window a message, it may process it and do what you
want, or it may get ignored. If you are sending this messge to a LV
window, LV will not process it a
nd will either pass it to the system, or
refuse it. You might want to try sending it to the explorer or to the
NULL window.

Greg McKaskle
0 Kudos
Message 4 of 5
(3,476 Views)
Check out the following post:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=5065000000080000004C610000&ECategory=LabVIEW.LabVIEW+General

There is a link to George Zou's website, who created a VI to shutoff a monitor.
Hope this helps-
Julie
0 Kudos
Message 5 of 5
(3,476 Views)