Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

Graphics with print function

$
0
0
I'm attempting to print data using the Printer.Print function. For reference, here's the coding:

Code:

Private Sub cmdPrint_Click()
    Printer.FontName = "Courier New"
    Printer.FontSize = 11
   
    Printer.FontBold = True
    Printer.FontUnderline = True
    Printer.Print "QTY"; Tab(6); "CODE"; Tab(21); "PRODUCT"; Tab(62); "W/SALE"; Tab(71); "DISC."; Tab(79); "TOTAL"
    Printer.FontUnderline = False
    Printer.FontBold = False
   
    Printer.FontSize = 5
    Printer.Print
    Printer.FontSize = 11
   
    For Rows = 0 To (lstQty.ListCount - 1)
        If Rows Mod 2 Then
            Printer.ForeColor = &H0
        Else
            Printer.ForeColor = &H6A6A6A
        End If
       
        Printer.Print lstQty.List(Rows); Tab(6); lstCode.List(Rows); Tab(21); Left$(lstDesc.List(Rows), 37); Tab(62); _
            lstWSale.List(Rows); Tab(71); lstDisc.List(Rows); Tab(79); lstTotal.List(Rows)
    Next Rows
   
    Printer.ForeColor = &H80000012
   
    Printer.Print
    Printer.Print Tab(79); "------"
    Printer.Print Tab(79); lblTotal.Caption
   
    Printer.Print
    Printer.Print
   
    Printer.Print "TEST PRINT ONLY"
   
    Printer.Print
    Printer.Print
   
    Printer.FontName = "Calibri"
    Printer.FontSize = 5
    Printer.Print "Printed by Our Ordering System"
    Printer.Print "Version 2.0.1"
    Printer.Print "www.websitehere.com"
    Printer.Print "Software developed by The PFJ Studios"
   
    Printer.EndDoc
End Sub

I would like to print a vertical line between each column (see TAB references in code above). There are 6 columns and I'd like a thin vertical line printed between each to clearly separate them. Is this possible?

Viewing all articles
Browse latest Browse all 21273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>