Solved

turn on the screen

Posted on 2009-04-14
2
250 Views
Last Modified: 2012-05-06
Hi experts

I have a fairly simple question  (I think)  :o)

I have a computer running my VB 2005 app. The computer is set to turn off its monitor after 10 minutes. (In control panel, power settings)
Now I want my app, at a given time, to be able to tell the pc to turn on the monitor again.
I have thought about doing some simulated mouse move but don't know how

Does anybody know how to solve my problem

Thanks in advance
0
Comment
Question by:liversen
2 Comments
 
LVL 23

Accepted Solution

by:
ComputerTechie earned 500 total points
ID: 24141299
0
 
LVL 1

Author Closing Comment

by:liversen
ID: 31570075
Ended up using mouse move. Seemed most elegant.
Thanks for the help.
My code:

'Declaration
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)

'In a method:
MOUSEEVENTF_MOVE = &H1
mouse_event MOUSEEVENTF_MOVE, 25, 25, 0, 0
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now