Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do form - object formname not found
Message
 
 
À
11/06/2006 12:03:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
SAMBA Server
Database:
Visual FoxPro
Divers
Thread ID:
01128327
Message ID:
01128342
Vues:
17
Paul,

Pass a reference to the parent from to the child form:
do form form2 with thisform
In the form2.Init() save the parameter to a proprty that will allow you to reference the parent form:
*form2.init()
lparameter roCallingForm

this.oCaller = roCallingForm


* save code
this.oCaller.xyz = thisform.txtXYZ.Value


* form2.Destroy()

this.oCaller = .null. && clear the reference
>I have a form (form1) with a list box. in the doubleclick event, i have "do form form2". you can make changes in form2. in the click event for form2's save button, i try to change some of the properties of some of the controls on form1.
>
>within the project manager, this works fine. however, in the executable, i get "object form1 not found", which is error 1923.
>
>i did some searching and found that once the code is executed in one form to open another form, the form object is released from memory. it states to use activeform, forms, and formcount properties to access the form. However, i've looked these up and don't understand how to "reactivate" form1 as an object without having to release the form and then do "do form1".
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform