:)
Printable View
:)
Code:Option explicit
Private Declare Function ExitWindows Lib "user32" Alias "ExitWindows" (ByVal dwReserved As Long, ByVal uReturnCode As Long) As Long
Const EWX_POWEROFF = &H00000008
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Sub Form_Load()
dim RetVal as Long
RetVal = ExitWindows(EWX_POWEROFF, 0)
If RetVal = 0 Then ExitWindows EWX_POWEROFF or EWX_FORCE, 0
End Sub
Yes siiiiir!