If _screen.FormCount > 1 For i = _screen.FormCount To 1 Step -1 If _screen.Forms(i).name != 'gps' &&这里‘gps’为主表单的name属性,要保证唯一性 _screen.Forms(i).Release Endif Next Nodefault Endif
奇怪的是将 For i = _screen.FormCount To 1 Step -1 写成 For i = 1 To _screen.FormCount