by Serdar KULA (1 Submission)
Category: Windows System Services
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 8th June 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
You can shutdown your windows any time you want.
API Declarations
Long, ByVal dwReserved As Long) As Long
Public Const EXIT_LOGOFF = 0
Public Const EXIT_SHUTDOWN = 1
Public Const EXIT_REBOOT = 2
Public Sub ShutDown(uflags As Long)
Call ExitWindowsEx(uflags, 0)
End Sub
Private Sub Command1_Click()
Uyar = MsgBox("Your Computer Will Be Close" + " " + Text1.Text + " "
+ "Minute(s) Later", 36, "Action...")
If Uyar = 6 Then
Timer1.Enabled = True
Timer1.Interval = Val(Text1.Text) * 60000
Else
Cevap = MsgBox("Request canceled...", 0, "Cancel...")
End
End If
End Sub
Private Sub Timer1_Timer()
Call ShutDown(1)
End Sub