VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Shuts Down, Logs Off or Reboots a machine in easy code.

The Spud Man  (1 Submission)   Windows System Services   VB 6.0   Unknown Difficulty   Fri 14th June 2002   Mon 8th February 2021

Shuts Down, Logs Off or Reboots a machine in easy code.

API Declarations


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


Rate Shuts Down, Logs Off or Reboots a machine in easy code. (1(1 Vote))
Shuts Down, Logs Off or Reboots a machine in easy code..bas

Shuts Down, Logs Off or Reboots a machine in easy code. Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters