VERSION 5.00
Begin VB.Form MainForm 
   Caption         =   "Sample Program"
   ClientHeight    =   1725
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   3270
   LinkTopic       =   "Form1"
   ScaleHeight     =   1725
   ScaleWidth      =   3270
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Receipt Sample"
      Height          =   1275
      Left            =   180
      TabIndex        =   0
      Top             =   240
      Width           =   2895
   End
End
Attribute VB_Name = "MainForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()

    For Each prnPrinter In Printers
        If prnPrinter.DeviceName = "BIXOLON SAMSUNG SRP-275" Then
            Set Printer = prnPrinter
            Exit For
        End If
    Next

    If Printer.DeviceName = "BIXOLON SAMSUNG SRP-275" Then
        Printer.Font.Size = 9
        Printer.FontName = "FontControl"
        Printer.Print "x"
        
        Printer.Font.Size = 9
        Printer.FontName = "FontA2x1"
        
        Printer.Font.Bold = True
        Printer.Print "* Joshua Cafe *" + vbCrLf
        Printer.Font.Bold = False
        
        Printer.Font.Size = 9
        Printer.FontName = "FontControl"
        Printer.Print "w"
        
        Printer.Font.Size = 9
        Printer.FontName = "FontA1x1"
        
        Printer.Print "    3000 Spring Street, Rancho,"
        Printer.Print "    California 10093,"
        Printer.Print "    Tel) 858-519-3698 Fax) 3852"
        
        Printer.Print vbCrLf + "---------------------------------"  'LF
        Printer.Print "Orange Juice                 5.00"
        Printer.Print "6 Bufalo Wing               24.00"
        Printer.Print "Potato Skin                 12.00"
        Printer.Font.Bold = True
        Printer.ForeColor = RGB(255, 0, 0)
        Printer.Print "Subtotal                    41.00"
        Printer.ForeColor = RGB(0, 0, 0)
        Printer.Font.Bold = False
        
        Printer.Print "Tax 6%                       2.46"
        Printer.Font.Bold = True
        Printer.ForeColor = RGB(255, 0, 0)
        Printer.Print "Member Discount              2.30"
        Printer.ForeColor = RGB(0, 0, 0)
        Printer.Font.Bold = False
        
        Printer.Font.Bold = True
        Printer.Print "Cash                       100.00"
        Printer.Print "Amt. Paid                   41.16"
        Printer.Font.Bold = False
        Printer.Font.Bold = True
        Printer.ForeColor = RGB(255, 0, 0)
        Printer.Print "Change Due                  58.84"
        Printer.ForeColor = RGB(0, 0, 0)
        Printer.Font.Bold = False
        Printer.Print "---------------------------------"
        
        Printer.Font.Size = 9
        Printer.FontName = "FontControl"
        Printer.Print "x"
        
        Printer.Font.Size = 9
        Printer.FontName = "FontA1x1"
        Printer.Print "Member Number :  452331949" + vbCrLf
        
        Printer.Font.Size = 9
        Printer.FontName = "FontA1x1"
        Printer.Font.Bold = True
        Printer.Print "Have a nice day !" + vbCrLf
        Printer.Font.Bold = False
        
        Printer.Print "Sale Date: 07/01/03"
        Printer.Print "Time: 12:30:45"
        
        Printer.Font.Size = 9
        Printer.FontName = "FontControl"
        Printer.Print "w"
        
        Dim pic As Picture
        
        Set pic = LoadPicture(App.Path & "\free5_100.bmp")
        
        Printer.CurrentX = 60
        Printer.CurrentY = 5000
        Printer.PaintPicture pic, Printer.CurrentX, Printer.CurrentY
        Printer.CurrentY = Printer.CurrentY + pic.Height
        
        Set pic = LoadPicture(App.Path & "\cafeblue208.bmp")
        Printer.PaintPicture pic, Printer.CurrentX, Printer.CurrentY
        
        Printer.CurrentX = 0
        Printer.CurrentY = 9000
        Printer.Font.Size = 9
        Printer.Font.Name = "FontControl"
        Printer.Print "g"
        
        Printer.EndDoc
    Else
        MsgBox "SRP-270 windows driver don't installed"
    End If
        
End Sub
