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
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
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&