Option ExplicitPrivate Declare Function SendMessage Lib "user32" _ Alias As Long Const WM_SYSCOMMAND = & H112 & Const SC_MONITORPOWER = & HF170 "SendMessageA" (ByVal hWnd As Long, ByVal wMsg _ As Long, ByVal wParam As Long, ByVal lParam As Long) _ &
Private Sub Cmdclose_Click () sendMessage me.hwnd, wm_syscommand, sc_monitorpower, 2 & 'According to MSDN, this parameter is 1, indicating that the display is in a low energy state. End Sub