Estimados Amigos
Aquí un ejemplo de código VB6 que hace uso del objeto Printer para imprimir un recibo.
En un formulario agregar un botón y desde el evento clic del botón invoca al procedimiento ReceiptPrint.
Private Sub ReceiptPrint()
For Each prnPrinter In Printers
If prnPrinter.DeviceName = "BIXOLON SRP-350" Then
Set Printer = prnPrinter
Exit For
End If
Next
Printer.Font.Size = 9.5
Printer.FontName = "FontControl"
Printer.Print "x"
Printer.Font.Size = 19
Printer.FontName = "FontA2x2"
Printer.Print ""
Printer.Font.Bold = True
Printer.Print "BIXOLON's MALL" + vbCrLf
Printer.Font.Bold = False
Printer.Font.Size = 9.5
Printer.FontName = "FontA1x1"
Printer.Print "Buy Online or call" + vbCrLf
Printer.Font.Size = 7
Printer.FontName = "FontB2x1"
Printer.Font.Bold = True
Printer.Print "1-800-915-3355"
Printer.Font.Bold = False
Printer.Font.Size = 9.5
Printer.FontName = "FontControl"
Printer.Print "w"
Printer.Font.Size = 9.5
Printer.FontName = "FontA1x1"
Printer.Print "------------------------------------------" 'LF
Printer.Print "BIXOLON SRP-350 Printer $999"
Printer.Print "SRP-770 Label Printer $749"
Printer.Print "SRP-370 Thermal Receipt Printer $1,299"
Printer.Print "SRP-270 Impact Receipt Printer $1,299"
Printer.Print "RIF-BT10 $949"
Printer.Print "SMP600 $349"
Printer.Print "SRP-500 Inkjet Receipt Printer $249"
Printer.Print "------------------------------------------"
Printer.Font.Bold = True
Printer.ForeColor = RGB(255, 0, 0)
Printer.Font.Size = 7
Printer.FontName = "FontB2x1"
Printer.Print "Total purchase : $5,893" + vbCrLf
Printer.Print "Visa : $5,893" + vbCrLf
Printer.Font.Bold = True
Printer.Print "Change : $0"
Printer.ForeColor = RGB(0, 0, 0)
Printer.Font.Bold = False
Printer.Font.Size = 9.5
Printer.FontName = "FontA1x1"
Printer.Print "------------------------------------------"
Printer.Font.Size = 9.5
Printer.FontName = "FontControl"
Printer.Print "x"
Printer.Font.Size = 9.5
Printer.FontName = "FontControl"
Printer.Print "r"
Printer.Font.Size = 20
Printer.FontName = "Code128"
Printer.Print "{A{S12235884584645" '+ vbCrLf
Printer.Font.Size = 9.5
Printer.FontName = "FontA1x1"
Printer.Print "Date : 11/08/2014 Time : 09:32"
Printer.Print "No : 00018857302" + vbCrLf + vbCrLf
Printer.Print "FREE Receip Sample "
Printer.Print "With Purchase of ANY Dimension Desktop"
Printer.Print "Ends Today !" + vbCrLf 'LF
'Este código es un ejemplo si quieres imprimir una imagen desde un archivo
'Picture1.Picture = LoadPicture(App.Path & "\star2.bmp")
'Picture1.Top = 0
'Picture1.Left = 0
'Printer.CurrentX = 10
'Printer.CurrentY = 5000
'Printer.PaintPicture Picture1.Picture, Printer.CurrentX, Printer.CurrentY
'
'Picture1.Picture = LoadPicture(App.Path & HP)
'Picture1.Top = 0
'Picture1.Left = 0
'Printer.CurrentX = X_Value
'Printer.CurrentY = Y_Value
'Printer.PaintPicture Picture1.Picture, Printer.CurrentX, Printer.CurrentY
Printer.Font.Size = 9.5
Printer.FontName = "FontControl"
Printer.Print "P"
Printer.Print "G"
Printer.Print "P"
Printer.EndDoc
End Sub
Saludos, desde algún lugar de Lima-Perú