主要在窗体form1的lostFocus事件就可以了! Private Sub Form_LostFocus() Unload Me '窗体失去焦点时(不是活动窗口时)将窗体从内存中卸载! End Sub This ok