Solved

c# code to put monitor to sleep and awake

Posted on 2014-09-23
4
363 Views
Last Modified: 2014-09-29
Hi

I need a c# code solution to put a Windows 7 Pro monitor to sleep and wake up on command.

Thank you
0
Comment
Question by:SkyMagic
  • 2
4 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40341739
What have you tried? What have you looked at?
0
 

Author Comment

by:SkyMagic
ID: 40342588
No was to busy with other work. Was hoping maybe someone had some info.
0
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
ID: 40343467
Simple answer is:
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);

Detail instructions are here:
http://www.codeproject.com/Articles/12794/Complete-Guide-on-How-To-Turn-A-Monitor-On-Off-Sta
0
 

Author Closing Comment

by:SkyMagic
ID: 40351315
Thank you!
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question