'send message implementation
SendMessage(Me.Handle.ToInt32, WM_SYSCOMMAND,
CType(SC_MONITORPOWER, IntPtr), CType(MonitorShutoff, IntPtr))
'declarations
Private Const MonitorShutoff As Integer = 2
Private Const WM_SYSCOMMAND As Integer = &H112
Private Const SC_MONITORPOWER As Integer = &HF170
<DllImport("user32.dll")> _
Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal hMsg As Integer, _
ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
End Function
每当我想在Windows 8.1中关闭显示器时,此代码会暂时关闭我的显示器然后再转到锁定屏幕,如何避开锁定屏幕? 这只是Windows 8+系统上的一个问题。我希望我的显示器关闭并保持关闭状态。我该怎么做?
答案 0 :(得分:0)
我相信它对你有用。这只是你的鼠标“移动”(或者你的键盘被“触摸”)。