Jeff Johnson wrote:
> I am trying to close all windows except two and am not having much luck.
> The following code releases all of the windows except the two I want to
> leave open and the _screen.activeform.  I even tried releasing the
> _screen.activeform first, but it still leaves it open.  I also tried
> ACTIVATE SCREEN and _SCREEN.Show().  Likewise, I tried frmtimer.activate
> making it the active form.  I can't seem to make the active form release. 
>
>  
>
> LnForms = _SCREEN.FormCount
>
> DO WHILE lnForms > 0
>
>   IF !(UPPER(_SCREEN.Forms(lnForms).name) $ 'CAPPTOOLBARBASE~FRMTIMER')
>
>     llSuccess = _SCREEN.Forms(lnForms).QueryUnload()
>
>     IF llSuccess
>
>       _SCREEN.Forms(lnForms).Release()
>
>     ENDIF
>
>   ENDIF
>
>   lnForms = lnForms - 1
>
> ENDDO
>
>  
>
> Any ideas?
>   

Just a WAG, but why not try and loop backwards?

For MyLoop = MyCount to 1
   * code to release the form(MyLoop) instance
endfor

Perhaps it's no different?

-- 
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to