Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Management Problem Again
Message
De
01/10/1999 10:57:53
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
 
 
À
01/10/1999 10:52:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00270872
Message ID:
00271539
Vues:
24
>Greetings and Salutations!
>
>> I have a main form that does this in the init method:
>
> do form custopen name custopen noshow
> do form custclose name custclose noshow
>
>> The forms open correctly and do not show in my environment. Then in the click method of a button on the main form I have:
>
> custopen.visible = .t.
>
>> And I get an error that object custopen cannot be found.
>
>The Init methods of all the controls of a form are executed before the Init of the form itself. So the error is accurate, the forms don't yet exist when the button's Init method is run. Consider putting the form code in the Load method, which runs before any of the Inits.
>
>Hope this helps.
>
>Cheers, Harry

Hi Harry,

This won't be the cause. The code
custopen.visible = .t.
is in the click event of the command button, not the init, so it's run after the form is created and can be accessed by the user.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform