下载办进京证的app:编程高手请进!~~~~
Private Sub Command1_Click()
aa = Text1.Text
End Sub
Private Sub Command2_Click()
Text1.Text = ""
End Sub
Private Sub Form_Load()
aa = Format("23:59:59")
End Sub
Private Sub Timer1_Timer()
If Format(Time$, "hh:mm:ss") > Format(aa, "hh:mm:ss") Then
Shell ("shutdown.exe /s /t 00")
End If
End Sub
还有这个
Public aa As String
Private Sub Form_Load()
Timer1.Enabled = False
End Sub
Private Sub Command1_Click()
aa = Text1.Text
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
If Format(Time, "hh:mm:ss") > Format(aa, "hh:mm:ss") Then
'Shell ("shutdown.exe /s /t 01")
MsgBox "时间到"
Timer1.Enabled = False
End If
End Sub
为什么不直接给shutdown加参数让10秒后关机???
Private Sub Command1_Click()
shell("shutdown -s -t " && text1.text && " -c " && text2.text)
End Sub
'text1.text是时间 text2.text是关机警告内容。