Here is my code:
And here is the actual code to do the task:Code:Public Declare Function PostMessage Lib "user32.dll" _ Alias "PostMessageA" _ (ByVal hwnd As IntPtr, _ ByVal wMsg As Int32, _ ByVal wParam As Int32, _ ByVal lParam As Int32) As Int32 Public Const WM_SYSCOMMAND = &H112& Public Const SC_MONITORPOWER = &HF170&
This puts the monitor into standby. Can I please have some help to modify the code to turn the monitor off, and also the code to turn it back on.Code:PostMessage(Me.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 2&)
Thanks


Reply With Quote

