VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1065
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   2730
   LinkTopic       =   "Form1"
   ScaleHeight     =   1065
   ScaleWidth      =   2730
   StartUpPosition =   3  'Windows ±βΊ»°ͺ
   Begin VB.CommandButton Command1 
      Caption         =   "Print Receipt"
      Height          =   615
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   2415
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Dim fDate As String

    fDate = Format(Now, "mmmm/dd/yyyy AM/PM hh:mm")

    Printer.Font.Size = 8.5
    Printer.FontName = "control"
    Printer.Print "x" + vbCrLf

    Set pic = LoadPicture(App.Path & "\sewoo.bmp")
    Printer.CurrentX = 0
    Printer.CurrentY = 0
    Printer.PaintPicture pic, Printer.CurrentX, Printer.CurrentY
    Printer.CurrentY = Printer.CurrentY + pic.Height

    Printer.Font.Size = 8.5
    Printer.FontName = "control"
    Printer.Print "y" + vbCrLf

    Printer.Font.Size = 8.5
    Printer.FontName = "FontA1x1"
    Printer.Print "TEL (123)-456-7890"

    Printer.Font.Size = 8.5
    Printer.FontName = "control"
    Printer.Print "x" + vbCrLf

    Printer.Font.Size = 8.5
    Printer.FontName = "FontA1x1"
    Printer.Print "Thank you for coming to our shop!"
    Printer.Print fDate + vbCrLf + vbCrLf

    Printer.Font.Size = 8.5
    Printer.FontName = "control"
    Printer.Print "w" + vbCrLf

    Printer.Font.Size = 8.5
    Printer.FontName = "FontA1x1"
    Printer.Print "chicken                   $10.00"
    Printer.Print "Hamburger                 $20.00"
    Printer.Print "Pizza                     $30.00"
    Printer.Print "Lemons                    $40.00"
    Printer.Print "Drink                     $50.00"

    Printer.Print "Excluded tax             $150.00"
    Printer.Print "Tax(5%)                    $7.50" + vbCrLf

    Printer.Font.Size = 8.5
    Printer.FontName = "FontA2x1"
    Printer.Font.Bold = True
    Printer.Font.Underline = True
    Printer.Print "Total    $157.50" + vbCrLf
    Printer.Font.Underline = False
    Printer.Font.Bold = False

    Printer.Font.Size = 8.5
    Printer.FontName = "FontA1x1"
    Printer.Print "Payment                  $200.00"
    Printer.Print "Change                    $42.50"

    Printer.Font.Size = 8.5
    Printer.FontName = "control"
    Printer.Print "rx" + vbCrLf

    Printer.Font.Size = 8.5
    Printer.FontName = "control"
    Printer.Font.Size = 18
    Printer.FontName = "Code128"
    Printer.Print "{A{S00073"

    Printer.EndDoc
End Sub

Private Sub Form_Load()
     For Each prnPrinter In Printers
        If (prnPrinter.DeviceName = "SEWOO LK-P11 Receipt") Then
            Set Printer = prnPrinter
            Exit For
        End If
    Next
    
    If (Printer.DeviceName <> "SEWOO LK-P11 Receipt") Then
        MsgBox "SEWOO LK-P11 Receipt Driver not installed", vbOKOnly
    End
    End If
End Sub
