REINICIAR, DESLIGAR, EM ESPERA E HIBERNAR
Galera Boa Tarde,
Como faço para "REINICIAR, DESLIGAR, EM ESPERA E HIBERNAR" atraves do VB para o XP?????????
Como faço para "REINICIAR, DESLIGAR, EM ESPERA E HIBERNAR" atraves do VB para o XP?????????
TENTE
Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Boolean
Public Const EWX_LOGOFF = 0
Public Const EWX_SHUTDOWN = 1
Public Const EWX_REBOOT = 2
Public Const EWX_FORCE = 4
Public Sub ShutDownWindows95(ByVal pExitType As Byte)
Dim Success As Boolean
Success = ExitWindowsEx(pExitType, 0)
If Success Then
MsgBox "Shutting down Windows NOW!"
End
Else
MsgBox "Function failed..."
End If
End Sub
Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Boolean
Public Const EWX_LOGOFF = 0
Public Const EWX_SHUTDOWN = 1
Public Const EWX_REBOOT = 2
Public Const EWX_FORCE = 4
Public Sub ShutDownWindows95(ByVal pExitType As Byte)
Dim Success As Boolean
Success = ExitWindowsEx(pExitType, 0)
If Success Then
MsgBox "Shutting down Windows NOW!"
End
Else
MsgBox "Function failed..."
End If
End Sub
Tópico encerrado , respostas não são mais permitidas