VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



You can shutdown your windows any time you want.

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



Rate You can shutdown your windows any time you want.



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



Download this snippet    Add to My Saved Code

You can shutdown your windows any time you want. Comments

No comments have been posted about You can shutdown your windows any time you want.. Why not be the first to post a comment about You can shutdown your windows any time you want..

Post your comment

Subject:
Message:
0/1000 characters