VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "BarCodeTest"
   ClientHeight    =   1650
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   2910
   LinkTopic       =   "Form1"
   ScaleHeight     =   1650
   ScaleWidth      =   2910
   StartUpPosition =   3  'Windows ±βΊ»°ͺ
   Begin VB.CommandButton cmdPrintBarCode 
      Caption         =   "Print BarCode"
      Height          =   495
      Left            =   240
      TabIndex        =   1
      Top             =   960
      Width           =   2415
   End
   Begin VB.ComboBox cboBarCode 
      Height          =   300
      Left            =   600
      TabIndex        =   0
      Top             =   360
      Width           =   1815
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim FName As String
Dim FSize As Byte

Private Sub cmdPrintBarCode_Click()
    Select Case cboBarCode.ListIndex
        Case 0:
            FName = "Code128"
            FSize = 18
        Case 1:
            FName = "Code93"
            FSize = 35.5
        Case 2:
            FName = "JAN13"
            FSize = 18
        Case 3:
            FName = "JAN8"
            FSize = 53
    End Select

    Printer.FontSize = 8.5
    Printer.FontName = "control"
    Printer.Print "r";
    Printer.Print "x";

    Printer.FontSize = FSize
    Printer.FontName = FName

    Select Case cboBarCode.ListIndex
        Case 0:
            Printer.Print "{A{SLUKHAN20" + Lf;
        Case 1:
            Printer.Print "ABCD" + Lf;
        Case 2:
            Printer.Print "123496784456" + Lf;
        Case 3:
            Printer.Print "9475464" + Lf;
    End Select

    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
       
    cboBarCode.AddItem "Code128"
    cboBarCode.AddItem "Code93"
    cboBarCode.AddItem "JAN13"
    cboBarCode.AddItem "JAN8"
    cboBarCode.ListIndex = 0
End Sub
