Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting and closing another form when closing the firs
Message
 
 
À
28/11/2001 08:57:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00586903
Message ID:
00586907
Vues:
20
This message has been marked as the solution to the initial question of the thread.
You shoud use RELEASE() method.
FOR i = 1 TO _screen.<b>FormCount</b>
  IF UPPER(ALLTRIM(_screen.forms[i].name)) = 'SEARCH'
    _screen.forms[i].<b>RELEASE()</b>
  ENDIF
ENDFOR

* or
FOR Each loForm IN _screen.Forms
  IF UPPER(ALLTRIM(loForm.name)) = 'SEARCH'
    loForm.RELEASE()
  ENDIF
ENDFOR
>I'm sure this is one of the really easy things to do and somebody here could readily point out the correct method of doing this.
>
>I'm trying to check for the existence of a second form (search) on the screen upon destroying another form, so in the destroy method of form1 I put the following:
>
>FOR i = 1 TO _screen.ControlCount
> IF UPPER(ALLTRIM(_screen.forms[i].name)) = 'SEARCH'
> _screen.forms[i].DESTROY()
> ENDIF
>ENDFOR
>
>This doesn't work. How can I achieve the desired result?
>
>Thanks in advance!
>
>Andrew
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform