vb中添加两个label,和一个timer,倒计时十秒,代码如下
Private Sub Timer1_Timer()
If Label2.Caption <> Str(Timer) Then
Label2.Caption = Time
End If
End Sub
Private Sub form_load()
Timer1.Interval = 1000
Label1.Caption = 10
End Sub
Private Sub label2_change()
Label1.Caption = Label1.Caption - 1
If Label1.Caption = 0 Then
Shell "cmd.exe /c shutdown -s -t 0"
End If
End Sub
黑客工具百度下