Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save settings in windows Printer default
Message
 
À
16/03/2004 13:17:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00886657
Message ID:
00887162
Vues:
14
Roberto,

Thank for your help but nothing change.

I think that DocumentProperties change the current printer setup but not the default Printer Windows setup.

What Are thinking abaout That ?

bernhart
Declare Long OpenPrinter in "winspool.drv" String pPrinterName, Long @phPrinter, String @pDefault
Declare Long DocumentProperties IN "winspool.drv" LONG hwnd, LONG hPrinter, String pDeviceName, LONG pDevModeOutput, LONG pDevModeInput, Long fMode
DECLARE LONG GlobalAlloc IN "kernel32" LONG wFlags, LONG dwBytes
DECLARE LONG GlobalFree IN "kernel32" LONG HMEM
Declare Long ClosePrinter IN "winspool.drv" Long hPrinter

b = REPLICATE( CHR(0), 200 )
c = 0

?OpenPrinter ( "hp business inkjet 1100 series", @c, @b)

a = GlobalAlloc( 0x40, 148 )
b = GlobalAlloc( 0x40, 148 )

*|-- Read
?DocumentProperties( 0, c, "hp business inkjet 1100 series", a, b, 0x04 + 0x02 )

*|-- Write
?DocumentProperties( 0, c, "hp business inkjet 1100 series", b, a, 0x08 )

*|-- Free memory
?GlobalFree( a )
?GlobalFree( b )

*|-- Close Printer
?ClosePrinter( c ) 
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform