Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to save user's environment
Message
From
26/07/2001 20:51:18
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00535841
Message ID:
00536148
Views:
11
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I'm thinking about the best way of saving some specific user's adjustments and environment.

I'll throw my strategy on top of everyone else's. Each of my forms has a RegistryName property (if empty, gets filled with reigistry location from app object and value of .name in the form's init).

Forms, Grids, Toolbars (everything that can be arranged by the user) use the form's RegistryLocation property and their respective RegistryName property to store their relevant properties in the HKEY_CURRENT_USER hive of the registry, and to retreive those settings in the init. Each form, grid, toolbar has properties that I can flip at design time to determine if they are to be 'sticky'.

You can use the FFC Registry class to fairly easy save/retreive values from the registry, or roll your own using it as an example.

Incidentally, once you have controls that know how to save their settings, it's trivial to build 'registry bound' data controls that bind to a value in a specified registry location instead of to a field in a table. This is great for 'Options' or 'Settings' forms your app may use to let the user specify preferences.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform