Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing values to a form property
Message
De
10/01/2000 22:11:30
 
 
À
10/01/2000 21:01:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00315902
Message ID:
00315934
Vues:
16
>I would like to know if there is a way to pass a forms property a value from lets say an INI file. I don;t want to customize each form for a name and then have to do it again if the company name changes?
>

You could add code to the Init() of the form to locate the file, read it, and set the desired values. You're not limited to using a text file; you could read the values from a .DBF, the registry, or pretty much anywhere you'd like.

You might want to delegate the responsibility for reading the initialization data to another section of code; you could read in the values and then pass the information to the form as parameters when launching the form; they'd be received by the form's Init method. If you have a large number of values to pass, it might be worthwhile to create a parameter object (nothing more than an object that is used to pass data back and forth; the information would be stored in properties of the parameter object, and then pass just the one object reference in, extracting the information from the object's properties.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform