Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 541
  • Last Modified:

c# code to put monitor to sleep and awake

Hi

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

Thank you
0
SkyMagic
Asked:
SkyMagic
  • 2
1 Solution
 
käµfm³d 👽Commented:
What have you tried? What have you looked at?
0
 
SkyMagicAuthor Commented:
No was to busy with other work. Was hoping maybe someone had some info.
0
 
pcelbaCommented:
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
 
SkyMagicAuthor Commented:
Thank you!
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now