你可以用timetick处理,比如
static pform As String = ""If forms.activeform IsNot Nothing If pform <> Forms.activeform.name AndAlso forms.activeform.name = e.form.name Then e.Form.TimerEnabled = False msgbox(123) e.Form.TimerEnabled = True End If pform = Forms.activeform.nameElse pform = ""End If