Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 79621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:10:28+00:00 2026-05-10T21:10:28+00:00

So my Vista machine is set to turn off it’s monitors after 10 minutes.

  • 0

So my Vista machine is set to turn off it’s monitors after 10 minutes. (Note : machine is not suspended, or hibernated)

I have a .Net application running, that needs to ‘wake’ the system at a specified time. As a human, you just move the mouse or press a key. How do I do this programatically?

I’ve tried : programatically setting the cursor; using ‘SendKeys’; and even pinvoking CreateWaitableTimer to unsuspend (even though it’s not suspended) in the hope that that would trigger something.

Ideally code in c# would be great, but the correct Win API would suffice.

Many thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:10:29+00:00Added an answer on May 10, 2026 at 9:10 pm

    You should be able to control monitor power by sending system command messages as follows. Note that this is tested on XP, Vista may have changed things somewhat so you’ll need to test it and let us know.

    This code is in VB but you can see the Win32 API call that it uses. You need to pass a window handle to the function so your code will need a window created to process the message (just pass it through to the default window processing function).

    Const SC_MONITORPOWER As Integer = &HF170 Const WM_SYSCOMMAND As Short = &H112S Private Function SendMessage(     ByVal Handle As Int32,     ByVal wMsg As Int32,     ByVal wParam As Int32,     ByVal lParam As Int32) As Int32 End Function Sub MonStandBy(hWnd as Int32)     SendMessage(hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, 1) End Sub Sub MonOff(hWnd as Int32)     SendMessage(hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, 2) End Sub Sub MonOn(hWnd as Int32)     SendMessage(hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, -1) End Sub 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 70k
  • Answers 70k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer AFAIK, you cannot check whether user-defined type was initialized before… May 11, 2026 at 12:50 pm
  • added an answer Not sure if it is a 'best practice' but the… May 11, 2026 at 12:50 pm
  • added an answer I can't think of a reason why const float &… May 11, 2026 at 12:50 pm

Related Questions

So my Vista machine is set to turn off it's monitors after 10 minutes.
I'm running Vista on my laptop, but would like to virtualize Ubuntu so that
So my company stores alot of data in a foxpro database and trying to
So my company uses a delightfully buggy program called Rational Purify (as a plugin
So my favourite web tool, Subtlety , was recently discontinued, which means that I
As I understand it, the command to ignore the content of a directory using
I have two issues both related to (I believe) my SQL Server setup. I
I bought a new Vista PC recently but was having lots of problems getting
I’ve got an issue with loading a particular X509 certificate within an ASP.NET application

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.