Hello,
I need code that works in **VB.NET** and **WINDOWS XP**:
I'm trying to find the code that will put a monitor in a powered-off or suspended state, like power save mode. I'd like to actually turn off the monitor, and also have the option to put it in standby mode. I have the code that works in VB6 and Windows 9x. It does not work in NT/2000/XP and I cannot port it over to .NET:
* * *
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const WM_SYSCOMMAND = &H112
Const SC_MONITORPOWER = &HF170
Private Sub Command1_Click()
' Turn Monitor Off
SendMessage [login to view URL], WM_SYSCOMMAND, SC_MONITORPOWER, ByVal -1&
End Sub
Private Sub Command2_Click()
' Turn monitor on
SendMessage [login to view URL], WM_SYSCOMMAND, SC_MONITORPOWER, ByVal 0&
End Sub
* * *Another example is attached. The code can be in the form of a class or module. All code must be well commented.
## Deliverables
1) Complete and fully-functional working component as well as complete source code of all work done. 2) Complete ownership and distribution copyrights to all work purchased.
## Platform
Windows 2000/XP using Visual Basic .NET
## Deadline information
Deadline must be met: 01/10/2003