Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to properly setup the environment for my Application
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00438067
Message ID:
00438096
Views:
23
>>I currently have an App consisting of a form displaying the parent table as the header and it's 6 child tables in grids, each on their own page of a pageframe. This app is initially going to be used just for viewing records and printing and emailing a few reports from Foxpro 2.6 tables. Eventually it will develop into a full blown data entry program.
>>
>>I'm about to wrap it in a basic menu system witht the standard File and Edit menus. My question is this. I need to know how to properly get the user's input for setting up the environment to their preferences. The main thing right now is to allow them to set the path to the data and a few other items like default "Email Text" and "Email Subject."
>>
>>Do I store this in a table and have the app read it at startup? Can you point me to an article to read or example to view?
>>
>
>You can store defaults whereever you'd like; if it's stored per machine, then the registry under HKEY_LOCAL_MACHINE somewhere or an .INI file makes sense; the registry under HKEY_CURRENT_USER or a shared table that you look to after logging in the user makes sense (if you have roaming profiles in the network and users log in from multiple systems, or several users access a common machine with different settings and they log in to Windows as themselves when accessing the app, the registry is an attractive mechanism that will rely on the Windows login to identify and verify the user without a separate login process, with Windows automatically assigning the correct registry hive for the user under HKEY_CURRENT_USER.) There's no fixed way to do things - it's the behavior you're comfortable using, that stores whatever settings are needed by your app. There's no set of fixed properties that will always be present unless you dictate some configuration information and test to ensure it's
>there when you run the app.
>
>It's just like filling out standard forms at the DMV; when you get your driver's license, you fill in a form with standard information that gets saved and printed on your license; when the cop pulls you over for doing 90 in a 15MPH zone, he looks up your driver's license, and discovers you've got a fake ID if after checking with DMV, it says you're 4'3" tall, 102 years old and legally blind...

Well I would like to learn how to write entries to the Registry. For now I just want to add one key with a value - "HKEY_LOCAL_MACHINE\Software\Epic\UpsiLab\DataPath" with a value of "H:\Labtemp".

How do I do this using the click event of a button? Once I get it in there, I think I'll be able to read it when my app starts.

I've been trying to use the Registry Access class that is in the VFP Component Gallery, however I am having no luck. I don't quite understand how to use the methods. Do I even want to use this class, or is there better out there?
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform