Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close top form from toolbar
Message
De
28/01/2005 15:26:15
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00981030
Message ID:
00981879
Vues:
45
>One other thing. With respect to the ReleaseObjects below, THIS.FormList is a collection object containing info on all the open forms in my app. For simplicity sake, you can just look at this a looping through the _screen Forms collection and closing those forms if not modal and not the TLF.
>
>>>
PROTECTED PROCEDURE ReleaseObjects
>>>     IF THIS.FormList.COUNT = 0
>>>          RETURN .T.
>>>     ENDIF
>>>     LOCAL lnItem, loForm
>>>     lnItem = 0
>>>     IF NOT EMPTY(THIS.FormList.ActiveFormHwnd)
>>>          lnItem = THIS.FormList.GETKEY(THIS.FormList.ActiveFormHwnd)
>>>     ENDIF
>>>     IF lnItem > 0
>>>          loForm = THIS.FormList.ITEM(lnItem)
>>>          IF loForm.SHOWWINDOW = 2
>>>               *!*     Do not close the top-level form
>>>               LOOP
>>>          ENDIF
>>>          IF loForm.WINDOWTYPE = 1
>>>               *!*     if the active form is modal, do not shutdown
>>>               RETURN .F.
>>>          ENDIF
>>>     ENDIF
>>>     LOCAL lnI, lnKount, loForm
>>>     lnKount = THIS.FormList.COUNT
>>>     FOR lnI = lnKount TO 1 STEP -1
>>>          loForm = THIS.FormList.ITEM(lnI)
>>>          loForm.QUERYUNLOAD()
>>>     ENDFOR
>>>ENDPROC
>>
>>So, what actually releases top form? QUERYUNLOAD?

Thanks Mark for all your help.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform