by Ben (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 17th October 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Easy code to shutdown computer using 32 bit ExitWindowsEx function
Private Declare Function ExitWindowsEx Lib "user32" (Byval uFlags as Long, byval dwreserved as Long)
Private Const FORCE& = 4
Private Const LOGOFF& = 0
Private Const REBOOT& = 2
Private Const SHUTDOWN& = 1
#endif 'WIN32
Private Sub Form_Click
Call ExitWindowsEx(Shutdown Or Force, 0)
'Replace Shutdown with Force or Logoff if wanted
End Sub
No comments have been posted about Easy code to shutdown computer using 32 bit ExitWindowsEx function. Why not be the first to post a comment about Easy code to shutdown computer using 32 bit ExitWindowsEx function.