471,570 Members | 926 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

Monitor Message

Is there a way to receive a message when the monitor turns on/off?
Such as in wndProc? I want to run some code after the monitor turns
back on. And when the mouse moves or the keyboard moves it turns on
the monitor so i will never know when the monitor turns on unless a
message gets fired back to me. I use sendMessage((int), this.handle,
WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF) to turn off the monitor.
Maybe can i use same constant in a event handler such as wndProc?

Thanks for any help.

Jan 5 '06 #1
2 1693
Hi,

Not sure ( I bet not) that you can get a notification when the user turn off
the monitor. Another thing is when the system turn it off to preserve energy
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Dave" <dc*****@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Is there a way to receive a message when the monitor turns on/off?
Such as in wndProc? I want to run some code after the monitor turns
back on. And when the mouse moves or the keyboard moves it turns on
the monitor so i will never know when the monitor turns on unless a
message gets fired back to me. I use sendMessage((int), this.handle,
WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF) to turn off the monitor.
Maybe can i use same constant in a event handler such as wndProc?

Thanks for any help.

Jan 5 '06 #2
Dave,

I'm not expert in this area, but I think the new PnP monitors (which are
almost all monitors nowadays) send this information to the display driver. I
believe if such notification is available it will be part of DDK. Probably
you should ask your question in related newsgroups.
--

Stoitcho Goutsev (100)

"Dave" <dc*****@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Is there a way to receive a message when the monitor turns on/off?
Such as in wndProc? I want to run some code after the monitor turns
back on. And when the mouse moves or the keyboard moves it turns on
the monitor so i will never know when the monitor turns on unless a
message gets fired back to me. I use sendMessage((int), this.handle,
WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF) to turn off the monitor.
Maybe can i use same constant in a event handler such as wndProc?

Thanks for any help.

Jan 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by KJM | last post: by
10 posts views Thread by santiago538 | last post: by
3 posts views Thread by hikums | last post: by
12 posts views Thread by Perecli Manole | last post: by
1 post views Thread by vijay.db | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.