473,386 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 1752
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: KJM | last post by:
How can I detect if the user has dual monitors and then how do I control which monitor a form is displayed on. Currently my forms always come up on my right monitor. What if I want to have it...
10
by: santiago538 | last post by:
Hi, Is there any way to specify which monitor a Window.open() will launch a new browser window in on systems with more than one display. It would only need to work with Mozilla browsers, and not...
3
by: hikums | last post by:
I dropped the db2detaildeadlock event monitor without flushing the events that were full hoping dropping it will clear the messages also. I now understand this is a default monitor that I should...
4
by: Charles Law | last post by:
I've been using monitors a bit lately (some of you may have heard ;-) ) and then up pop Manual and AutoResetEvents , and they look for all the world like the same thing. Are they...
12
by: Perecli Manole | last post by:
I am having some strange thread synchronization problems that require me to better understand the intricacies of Monitor.Wait/Pulse. I have 3 threads. Thread 1 does a Monitor.Wait in a SyncLock...
10
by: RobinS | last post by:
Hello to all, and happy new year! I have this application that someone wrote that I'm sort of checking out. The forms look fine in design mode, but when I run the application, it crops off the...
1
by: vijay.db | last post by:
Hi group, Have a problem with event monitor so my db2diag.log is getting filled like any thing.. Running DB2 V8.1 Fixpack 6 in AIX server. Created a event monitor and redirecting it's...
13
by: Cross | last post by:
I am developing an application that will show movies. When you wach a movie, you do not want the Power Option "Turn off monitor" to be anabled. Is there anyway to fix this from VB.net? (note that I...
5
by: jbenner | last post by:
I have opened a PMR for this with IBM, and am not asking for advice from the DB2 DBA community. I am posting this as an FYI that DB2 Health Monitor, even at the latest version of DB2, still can cause...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.