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            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   2415
   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 = "SEWOO BarCode 1"
            FSize = 18
        Case 1:
            FName = "SEWOO BarCode 2"
            FSize = 18
        Case 2:
            FName = "SEWOO BarCode 3"
            FSize = 18
    End Select

    Printer.FontSize = FSize
    Printer.FontName = FName

    Select Case cboBarCode.ListIndex
        Case 0:
            Printer.Print "012345" + Lf;
        Case 1:
            Printer.Print "012345" + Lf;
        Case 2:
            Printer.Print "aA23Bb" + Lf;
    End Select

    Printer.EndDoc
End Sub

Private Sub Form_Load()
     For Each prnPrinter In Printers
        If (prnPrinter.DeviceName = "SEWOO LK-P11 Label") Then
            Set Printer = prnPrinter
            Exit For
        End If
    Next
    
  If (Printer.DeviceName <> "SEWOO LK-P11 Label") Then
    MsgBox "SEWOO LK-P11 Label Driver not installed", vbOKOnly
    End
  End If
       
  cboBarCode.AddItem "SEWOO BarCode 1"
  cboBarCode.AddItem "SEWOO BarCode 2"
  cboBarCode.AddItem "SEWOO BarCode 3"
  cboBarCode.ListIndex = 0
End Sub
