Results 1 to 2 of 2

Thread: Controlling a printer...

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    2

    Post

    Hello all,
    I have made a POS database prog for a local comapany. I have run into problems with controlling the dot-matrix printers which would print the sales invoices. This is on a network too. Anyways, trying to deal with multiple printers, each a different manufacturer/brand and model can cause a lot of headaches... :-(

    k, the prob: with 1 printer, the ouput is perfect in all regards. But sense the other printer is a different brand and the feed length is different I cannot duplicate this perfect output on the 2nd printer. Uh, the columns, spacing and quailty are fine, its just the feed length is screwed up. So is it possible to tell this printer to feed the paper a couple of lines and then print the invoice? Is it possible to control the feed on a printer in vb6? After you tear off the invoice from the printer, the position of the printer when its told to print the next invoice will cause it to be mis-aligned.

    Any thoughts/ideas would be appreciated...

    Frank

  2. #2
    Junior Member
    Join Date
    Jun 1999
    Location
    St. Louis MO USA
    Posts
    18

    Post

    Add A common dialog box to the program and run a bit of code like so to determine what printer is being used:

    For Each xPrinter In Printers
    If xPrinter.DeviceName = Printer.DeviceName Then
    Set Printer = xPrinter
    Printer.FontName = Default
    'below sets the font for selected printer
    Printer.FontName = "Courier New"
    Printer.FontSize = 11
    Printer.PrintQuality = vbPRPQDraft
    'below shows user and programmer what the default printer is and what font is being used and the size and the quality It will not show at run time
    MsgBox "Printer.PrintQuality = " & Printer.PrintQuality & " Printer.fontname = " & Printer.FontName & " and printer.fontsize = " & Printer.FontSize & " Printer.DeviceName = " & Printer.DeviceName
    ' Stop looking for a printer.
    Exit For
    End If
    Next


    Then use an if statement for .devicename or whatever and add a couple of lines before it prints if need be.

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