Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need way to get the printer driver name from within VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00338341
Message ID:
00338543
Vues:
11
>George,
> thanks for the info. Because I need this to change from the default printer it looks like I'm going to have to learn to read the registry from within VFP. Is there any simple way? I understand what I need I'm just not sure how to do it in VFP.

As Ed mentioned, VFP 6.0 has a vcx for manipulating the registry. This same program was also available in VFP 5.0 as registry.prg.

>By the way, while looking in WIN.INI I found a section named [PrinterPorts]. It lists each printer, the port and the driver name but without the extension of .DRV. Do you think it would be safe to use this?
>
Under Win 9x, sure. I'm not so certain about NT, however. Easiest way would be to use the GetProfileString() API call. As I recall, the registry.vcx class library may have a class that does this in 6.0. For previous versions, there's my INIFiles class that's available here (under Win32 and Other APIs) for download.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform