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

x
?
Solved

turn on the screen

Posted on 2009-04-14
2
Medium Priority
?
258 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 1500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

824 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