Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing forms on application exit
Message
De
29/07/2004 22:00:37
 
 
À
29/07/2004 13:30:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00929245
Message ID:
00929434
Vues:
7
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform