|
-
Nov 12th, 2005, 10:56 PM
#1
Thread Starter
Frenzied Member
Turn monitor on [Please Help]
Hi,
I'm not sure if this is the correct category.
I am trying to find some code which will allow me to turn the monitor on, when it is in standby mode.
This is for a network administrator, who needs a remote administration project which i'm working on.
this is for vb6
Thanks for any reply
-
Nov 13th, 2005, 08:54 PM
#2
Thread Starter
Frenzied Member
Re: Turn monitor on [Please Help]
This has been resolved now, I used an API that forces a keydown, which makes the monitor wake up.
Thanks anyway
-
Nov 14th, 2005, 12:53 AM
#3
Re: Turn monitor on [Please Help]
Since random keypressings can do funny things, the best way is to use the pure API method 
VB Code:
Declare Function SendMessage Lib "user32" Alias "SendMessageW" ( _
ByVal hWnd As Long, _
ByVal uMsg As Long, _
ByVal wParam As Long, _
ByRef lParam As Any _
) As Long
Const HWND_BROADCAST = &HFFFF
Const WM_SYSCOMMAND = &H112
Const SC_MONITORPOWER = &HF170
' Turn monitor on
SendMessage HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, ByVal -1&
' Turn monitor off
SendMessage HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, ByVal 0&
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|