怎么样使用API使计算机休眠或待机?
(声明:魏滔序原创,转贴请注明出处。)
PrivateDeclare Function SetSuspendState Lib "Powrprof" (ByVal Hibernate As Boolean, ByVal ForceCritical As Boolean, ByVal DisableWakeEvent As Boolean) As Boolean
示例:
SetSuspendState True, True,True
'参数Hibernate: =False:待机; =True:休眠
'参数ForceCritical: =False:不强行中止运行中的进程; =True:强行中止运行中的进程
'参数DisableWakeEvent =False:允许系统事件唤醒计算机; =True:系统不能唤醒计算机
本文地址:http://www.45fan.com/a/question/69061.html