VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)
首页 - 经验之谈 - 退出并关闭 Windows
发表评论(0)作者:, 平台:, 阅读:8715, 日期:2000-03-12
声明:

Global Const EWX_LOGOFF = 0

Global Const EWX_REBOOT = 2

Global Const EWX_SHUTDOWN = 1

Declare Function ExitWindows Lib "User32" Alias "ExitWindowsEx" (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long

使用:

lresult = ExitWindowsEx(EWX_SHUTDOWN, 0&) '关闭计算机

lresult = ExitWindowsEx(EWX_REBOOT, 0&) '重新启动计算机