Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Printer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00056438
Message ID:
00056975
Vues:
34
>>Can anyone tell me how to find out what the default printer is from within VFP 5.0
>>
>>Thanks
>
>Lamar,
>
>This information is kept in both the registry and the WIN.INI file, with the latter being the easier of the two to retrieve information from. Previously you would have had to use the GetProfileString() in the API (and you still can), however, FOXTOOLS has added a hook to this function. Once you've set the library, the following will get you the default printer.
>
>lcsection = 'windows'
>lcentry = 'device'
>lcdefault = ""
>lcbuffer = SPACE(80)
>lnbuflen = LEN(lcbuffer)
>= GetProStrg(lcsection, lcentry, lcdefault, @lcbuffer, lnbuflen)
>
>The information contained in the buffer will include the printer name, driver, and port or network connection.
>
>hth,
>
>George

set('printer',2) returns the name of the current print device (not always the windows default printer).
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform