Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing forms on application exit
Message
From
29/07/2004 22:00:37
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00929245
Message ID:
00929434
Views:
8
This message has been marked as a message which has helped to the initial question of the thread.
>>Hi,
>>
>>
>>FOR EACH loForm IN _SCREEN.FORMS
>>  loForm.RELEASE()
>>NEXT
>>
>>
>>HTH
>
>That won't work, as you'll only release every other form. You need to count down backwards:
>
>
>FOR x=_SCREEN.FormCount TO 1 STEP -1
>  _SCREEN.Forms(x).Release()
>ENDFOR
>
I check too for toolbars and queryUnload() method:
for lnForm = _screen.FormCount to 1 step -1
  if type('_screen.Forms(lnForm)') == 'O'
    if lower(_screen.Forms(lnForm).baseClass) <> 'toolbar'
      if _screen.Forms(lnForm).Closable
        if _screen.Forms(lnForm).QueryUnload()
          _screen.Forms(lnForm).Release()
        else
          return .f.
        endif
      endif
    endif
  endif
endfor
Previous
Reply
Map
View

Click here to load this message in the networking platform