|
|
你编个程序,这个程序在运行指定的时间后自动关机,加到启动组里。比如
运行Visual Basic,新建一个工程,添加一个计时器,interval属性设为1000(单位是毫秒),然后在代码窗口输入:
Dim t As Long
Dim wait As Long
Private Sub Form_Load()
App.TaskVisible = False
Me.Visible = False
wait = 1000
End Sub
Private Sub Timer1_Timer()
t = t + 1
If t = wait Then Shell "shutdown.exe -s -f -t 1000"
End Sub
其中wait表示运行多少秒后关机。 |
|