VB运行后30秒鼠标键盘无操作自动关闭
怎样让VB程序运行后30秒鼠标键盘无操作自动关闭介绍详细点啊,详细操作说明。我菜鸟啊!!!!谢谢大虾们!...
怎样让VB程序运行后30秒鼠标键盘无操作自动关闭
介绍详细点啊,详细操作说明。我菜鸟啊!!!!谢谢大虾们! 展开
介绍详细点啊,详细操作说明。我菜鸟啊!!!!谢谢大虾们! 展开
4个回答
展开全部
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Static s
s = s + 1
t = 30 - s
If t = 0 Then
Timer2.Enabled = False
MsgBox "时间到,退出", vbCritical, "error"
End
End If
End Sub
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Static s
s = s + 1
t = 30 - s
If t = 0 Then
Timer2.Enabled = False
MsgBox "时间到,退出", vbCritical, "error"
End
End If
End Sub
展开全部
Private flag As Boolean
Private a As Integer
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
flag = True
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
flag = False
Form1.KeyPreview = True
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
flag = True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
flag = True
End Sub
Private Sub Timer1_Timer()
If flag = False Then
a = a + 1
If a >= 30 Then End
Else
a = 0
flag = False
End If
End Sub
Private a As Integer
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
flag = True
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
flag = False
Form1.KeyPreview = True
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
flag = True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
flag = True
End Sub
Private Sub Timer1_Timer()
If flag = False Then
a = a + 1
If a >= 30 Then End
Else
a = 0
flag = False
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Dim sj As Date
Dim sj1 As Date
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
sj = Now()
End Sub
Private Sub Form_Load()
Form1.KeyPreview = True
Timer1.Interval = 1000
sj = Now()
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
sj = Now()
End Sub
Private Sub Timer1_Timer()
sj1 = Now()
a = DateDiff("s", sj, sj1)
If a > 30 Then
end
End If
End Sub
Dim sj1 As Date
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
sj = Now()
End Sub
Private Sub Form_Load()
Form1.KeyPreview = True
Timer1.Interval = 1000
sj = Now()
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
sj = Now()
End Sub
Private Sub Timer1_Timer()
sj1 = Now()
a = DateDiff("s", sj, sj1)
If a > 30 Then
end
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你想干什么?做坏事?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询