Click to See Complete Forum and Search --> : PRINTER API


vbhelper
June 18th, 2001, 05:03 AM
Hi!
Please some one can tell me, How I can write these code using API?
Thank in advance.

 Printer.Copies = 1 'Specify how many sheet to be printed

  Printer.FontTransParent = false 'Specify not "transparent".
  Printer.print " " 'Single-byte space
  Printer.FontTransParent = true 'Specify "transparent".

’ Use the below section if the FillStyle property can not be enabled.
  Printer. FillStyle = 0 'Specify "fill".
  Printer.print " " 'Single-byte space
 Printer. FillStyle = 1 'Specify "transparent".

Printer.print "Prodcut name" 'Specify the strings to be printed.

Printer.EndDoc



Actually, This give me memory leak error on win98 and I wanted to tested with using an API.
Thanks

John G Duffy
June 18th, 2001, 11:05 AM
You need to look at the following APIs
OpenPrinter
ClosePrinter
StartDoc
EndDoc
SetTextColor
CreatePen
CreateBrush
DrawText
TextOut
StartPage
EndPage
CreateFont
CreateFontIndirect
'
look at MSDN Article Q145726 for Transparency issues.
ALso look at MSDN documents pertaining to the above APIs. MSDN has some real good examples on how to overcome the Printer Objects deficiencies.

John G