-
shell ("shutdown -s -t 360") 'It means that it will turn off after 360 seconds.
Note: -s is to shut down, -l is to log out, and -r is to restart.
-
private sub command1_click()if = "Get started" then
truetext1 = val(text1) *60= "Stop"
else false
Get started"end if
end sub
private sub timer1_timer()text1 = text1 - 1
if text1 = "0"then = false: call to shut down.
end sub
sub Shutdown ().
shell " /c shutdown -s -t 0"
msgbox "Shut down"
end sub
-
- - Upstairs is too troublesome private sub command1 click().
a = str(val( *60)
shell "shutdown -s -t" + aend subprivate sub command2_click()
shell "shutdown -a"
end sub
Just tried absolutely
-
If you use xp, for example, shut down after 1 hour, then start running shutdown -s -t 36003600 how many seconds will it shut down, 1 hour is 3600, 2 hours is 7200, and so on Vista can't be used.
-
I tried it on the XP question.
Change it this way.
dim i as long
private sub command1_click()i = 20
true iend sub
private sub form_load()= false
end sub
private sub timer1_timer()= i
if i > 0 then
i = i - 1
else false
msgbox "It's time! "
end if
end sub
-
You copy the ** and see. **Can't see clearly.
There must be something wrong with it.
This app is very simple.
-
To fully meet your requirements, you need the source file to give the address.
-
Create a new form from1 and a button command1
Add a timer1 control and two labels (countdown x hours x minutes) (to show the current time).
hours) minutes) text3 (seconds).
..Zhang Zhichen: .**。
dim t$
private sub command1_click()
t is the time when the device is set to be shut down.
t = text1 & ":" & text2 & ":" & text3
Start the timer control and start the countdown.
trueend sub
private sub form_load()
Set the time interval for the timer control to 1 second.
When the program is started, the timer is not available.
falseend sub
private sub timer1_timer()
Countdown, set the difference between the time and the current time.
timelabel = format(cdate(t) -time, "hh:mm:ss")
Displays the current system time.
nowlabel = time
If the time difference is 0, it will be shut down immediately!!
if timelabel = "00:00:00" then shell "shutdown -s -t 0"
end sub
-
Start Running cmd pop-up window Enter the command on it, no programming is required.
For example, at 11:55 shutdown -s means that the computer will shut down at 11:55, and a reminder will be sent one minute before. S is changed to a to terminate the scheduled task.
-
Create a label control on the form label1 and a timer control timer1dim sec as long
private sub form_load()= 1000
sec = 600 'here modified to the countdown time you need label1 = sec &"Shut down after seconds"
end sub
private sub timer1_timer()sec = sec - 1
label1 = sec & "Shut down after seconds"
if sec <= 0 then
shell "shutdown -s -f -t 0"
end if
end sub
Use cmd's timer to shut down.
private void button1_click(object sender, eventargs e) >>>More
If you are using a Huawei phone, we recommend that you do the following: >>>More
In the event of an automatic restart of Apple, it is recommended to deal with it in the following ways: >>>More
Hello, sorry for the inconvenience.
If you want to recall whether the automatic restart occurs under a specific operation or software, we recommend that you perform the following simple troubleshooting: >>>More
You can directly turn off the cool.