Imports System.Runtime.InteropServices
Public Class Form1
Private Const MONITOR_DESLIGA As Integer = 2
Private SC_MONITORENERGIA As Integer = &HF170
Private WM_COMANDOSISTEMA As Integer = &H112
<DllImport("user32.dll", SetLastError:=True)>
Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
End Function
<DllImport("user32.dll")>
Private Shared Function SendMessage(ByVal hWnd As Integer, ByVal hMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TurnOffLCD()
End Sub
Public Sub TurnOffLCD()
Dim num As Integer = 0
num = SendMessage(FindWindow(Nothing, Nothing).ToInt32, Me.WM_COMANDOSISTEMA, Me.SC_MONITORENERGIA, 2)
End Sub
End Class