声明部分
Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
代码部分
Private Sub Command1_Click()
ExitWindowsEx EWX_LOGOFF, 0
End Sub
Private Sub Command2_Click()
ExitWindowsEx EWX_REBOOT, 0
End Sub
Private Sub Command3_Click()
ExitWindowsEx EWX_SHUTDOWN, 0
End Sub
XP系统,单击这三个按钮的效果是一样的,三个按钮都只能注销,而不能重启,关机,请问老师这是怎么回事? |