Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent users to print in a preview mode
Message
De
07/07/1999 07:36:26
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
06/07/1999 18:09:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00229460
Message ID:
00238173
Vues:
17
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform