Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prevent users to print in a preview mode
Message
From
07/07/1999 07:36:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
06/07/1999 18:09:09
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00229460
Message ID:
00238173
Views:
15
>I was wondering what could happen if you include a copy of the foxuser file into the project with another name like ‘BackUpUser’ and overwrite the original foxuser every time the application is started.
>
>Use BackUpUser
>Copy to foxuser with cdx

This is quite OK, and should work, except there's no CDX - it's created on-the-fly, and if you ever see a foxuser.idx, it means the last exit from VFP was less than regular. VFP deletes it on exit.

I'd add a per-user setting, so we should have one resource file for each user (otherwise no networking), so:
lcUserResource=< construct a local filename to be on user's machine >
use BackUpUser
copy to (lcUserResource)
use
set resource to (lcUserResource)
set resource on
>It could be more sophisticated if you start VFP with no foxuser file in order to have VFP to create a new one and then remove any toolbar buttons or do any configuration which gets stored into foxuser, quit VFP so foxuser gets updated an then open it as the first thing next time you open VFP in order to save it with this new changes. Then the application could ‘lookup’ for changes and replace them with the original ones and in case they have been removed, insert them again.

Actually, once the above step is performed, the records which are important (i.e. print preview toolbar contents) should be checked and replaced from BackUpUser, and other records (which should keep positions of other windows, font settings etc) could be left as-is.

>Is there a CRC checking or any other kind of corruption being checked by VFP into the foxuser file? If so it could crash or just do nothing.

There is, but the function used to calculate it is described in the help. At least it was, in 2.6, and probably still is.

>You may have to reload configurations from FoxUser (which I have no idea of how to do it) or probably quit the application so the user starts again with the FoxUser file updated.

Configuration from foxuser is not loaded all at once, but as needed, for each particular type of setting. Like, when the user opens some of the system windows, VFP checks if there's a specific setting for that window in Foxuser. If it's there, it's used. When the window is closed, it's saved. This mechanism starts when you Set Resource ON, and you can do that anytime you like.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform