Use VB to close a piece of code for the display

xiaoxiao2021-03-06  36

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

转载请注明原文地址:https://www.9cbs.com/read-54319.html

New Post(0)