窗口弄一个计时器,写代码
If Forms.ActiveForm Is Nothing OrElse Forms.ActiveForm.Name <> e.Form.Name Then
e.Form.Close
End If
http://www.foxtable.com/help/topics/1301.htm