计时器那里,检测一下值的变化,不就行了
Static val As Double = 0
If LastInputTickCount > 30000 Then '30秒空闲 val = LastInputTickCount End If
If val > 30000 AndAlso val > LastInputTickCount Then '从30秒空闲 变成不空闲
val = 0
'执行你的代码
End If