VB 系统待机 代码

来源:互联网 发布:网红的淘宝店铺有哪些 编辑:程序博客网 时间:2024/04/30 06:32
Private Declare Function SetSuspendState Lib "Powrprof" (ByVal Hibernate As BooleanByVal ForceCritical As BooleanByVal DisableWakeEvent As BooleanAs Boolean
'Powered by barenx
'示例:
'
SetSuspendState True, True,True

 
'参数Hibernate:  =False:待机; =True:休眠
 '参数ForceCritical:  =False:不强行中止运行中的进程; =True:强行中止运行中的进程
 '参数DisableWakeEvent  =False:允许系统事件唤醒计算机; =True:系统不能唤醒计算机