1个回答
展开全部
窗体上放一个时钟控件 timer1:
Dim t As Integer
Private Sub Form_Load()
Timer1.Interval = 1000
Timer1.Enabled = True
Me.Caption = "1分钟后自动关机"
End Sub
Private Sub Timer1_Timer()
t = t + 1
If t >= 60 Then
Shell "shutdown -s -t 0"
End
End If
End Sub
Dim t As Integer
Private Sub Form_Load()
Timer1.Interval = 1000
Timer1.Enabled = True
Me.Caption = "1分钟后自动关机"
End Sub
Private Sub Timer1_Timer()
t = t + 1
If t >= 60 Then
Shell "shutdown -s -t 0"
End
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询