Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to identify the default printer
Message
De
30/08/1999 12:38:23
Walter Meester
HoogkarspelPays-Bas
 
 
À
30/08/1999 11:51:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00258365
Message ID:
00259230
Vues:
24
Ed, Cristobal,

>In VFP6, SET('PRINTER',3); I don't know of an equivalent under VFP5, so you'd need to track this in your application (doable with GETPRINTER(), since it returns a string name of the printer or a null string if cancelled, not with SYS(1037), which always returns a null string.)

One trick is to create a dummy quick report in the following manner:

create a dummy cursor:
CREATE CURSOR DUMMYCURSOR(DUMMY C)

then create a dummy quick report
CREATE REPORT DUMMYREPORT FROM DBF("DUMMYCURSOR")

open the report as a table:
USE Dummyreport.frx

And read the second line of the Expr field.
cDefaultFoxPrinter=STRTRAN(MLINE(Expr,2),"DEVICE=","")

It's kind of slow, but it seems to work.

Walter,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform