Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Field-Mappings through code or configuration
Message
From
28/08/1997 22:25:38
Craig Mcclelland
Computer Fiscal Services
Sydney, Australia
 
 
To
28/08/1997 21:04:17
Craig Mcclelland
Computer Fiscal Services
Sydney, Australia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00047247
Message ID:
00047495
Views:
26
>>>Thanks for the reply Barbara.
>>>Just to clarify the question a little ... we are actually trying to change the mappings/classes used for the drag-and-drop in the form designer before the form is created rather than after the event.
>>>Naturally we can go into the tools\options sheets and change the mappings there manually but we were hoping to automate that to make it easier to swap between projects (we are very lazy programmers).
>>
>>Here is an idea. I haven't tried it but I believe there is a solution somewhere in this answer.
>>Go to Regedit. Find the key HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\5.0\Options\IntelliDrop\FieldTypes
>>Goto the File menu and say export registry entries. This will copy those registry entries to a file with a .reg extension.
>>I believe if you run the command regedit with a .reg file as a command line parameter it will automatically update the registry with the values. This means you can create a bunch of .reg files for each project and update the registry before using your project.
>>
>>Hope this helps.
>>Darrel
>Thanks very much for the suggestion. I will try it out.

Darrel,
I tried this out and it works beautifully.
I exported the "HKEY_CURRENT_USER\Software\Microsoft\VisualFoxPro\5.0\Options\IntelliDrop\FieldTypes" branch that you identified to file 'Proj 1 Field Mappings.reg', Proj 2 Field Mappings.reg' etc. ie: each file contains the mappings I want for a particular project.
Double clicking on these files (through explorer/desktop) merges the contents into the registry (also works as you suggested by running regedit with the file as a command line paramater).
VFP picks up the new settings for the next drag-and-drop operation (I didn't even have to close the form designer for it to pick up the new settings!!).

Thanks for tip.
Craig
Previous
Reply
Map
View

Click here to load this message in the networking platform