CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: PRINTER API

  1. #1
    Join Date
    Jun 2001
    Posts
    14

    PRINTER API

    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".

    f 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



  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: PRINTER API

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured