Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Caliing a Non Modal form
Message
De
13/05/2006 12:40:09
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01121669
Message ID:
01121672
Vues:
12
>I have 2 issues:
>1. When I close formA I wlays want FormB to close (otherwise it would be left dangling)

>2. Before I call FormB, it would be nice If I could identify if its already there, if It is just show it, otherwise do a Do Form

Just add a property ChildForm to FormA to store reference to FormB and set default value to .Null. For example this code will create/show FormB:
IF ISNULL(ThisForm.ChildForm) &&FormB is not created
  DO FORM "FormB.scx" NAME ThisForm.ChildForm LINKED &&Create child form and store reference
 ELSE
  ThisForm.ChildForm.Show() &&Show the form
ENDIF
Because form is created with LINKED option it will be automatically released if FormA is released.
/A new technology turns into completely outdated stuff before you have a time to read "Getting Started..." section.
/If there are some "system programmers" then others are unsystematic.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform