by N.W.K. Sampath Kumara (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 8th January 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This will shut down the computer
API Declarations
You should select the EXITWINDOWSEX from the listbox and insert it in to your Forms Declaration
Dim lngX as long
Dim lngY as long
Dim lngX=2 'This is the number to shutdown. 1 for Reboot, 2 for Logoff
lngY=ExitwindowsEx&(lngX,0)
End Sub