VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Barcode Test"
   ClientHeight    =   1815
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   2775
   LinkTopic       =   "Form1"
   ScaleHeight     =   1815
   ScaleWidth      =   2775
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame1 
      Caption         =   "Barcode Test"
      Height          =   1575
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   2535
      Begin VB.CommandButton Command1 
         Caption         =   "Print Barcode"
         Height          =   495
         Left            =   240
         TabIndex        =   2
         Top             =   840
         Width           =   1935
      End
      Begin VB.ComboBox korCmb 
         Height          =   315
         Left            =   240
         TabIndex        =   1
         Text            =   "Code128"
         Top             =   360
         Width           =   1935
      End
   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()
    
Select Case korCmb.Text
        Case "Code128":
            FName = "Code128"
            FSize = 18
        Case "Code93":
            FName = "Code93"
            FSize = 35.5
        Case "JAN13 (EAN)":
            FName = "JAN13 (EAN)"
            FSize = 18
        Case "JAN8 (EAN)":
            FName = "JAN8 (EAN)"
            FSize = 53
        Case "PDF417":
            FName = "PDF417"
            FSize = 8.5
               
 End Select

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

Printer.FontSize = FSize
Printer.FontName = FName

 Select Case korCmb.Text
        Case "Code128":
            Printer.Print "{A{SAK45" + Lf;
        Case "Code93":
            Printer.Print "ABCD" + Lf;
        Case "JAN13 (EAN)":
            Printer.Print "123496784456" + Lf;
        Case "JAN8 (EAN)":
            Printer.Print "9475464" + Lf;
        Case "PDF417":
            Printer.Print "PDF417 Test" + Lf;
               
 End Select

    Printer.EndDoc
    
End Sub

Private Sub Form_Load()
     
     For Each prnPrinter In Printers
        If prnPrinter.DeviceName = "BIXOLON SPP-R200" Then
            Set Printer = prnPrinter
            Exit For
        End If
    Next
    
  If Printer.DeviceName <> "BIXOLON SPP-R200" Then
    MsgBox "BIXOLON SPP-R200 driver not installed", vbOKOnly
    End
  End If
       
  korCmb.AddItem "Code128"
  korCmb.AddItem "Code93"
  korCmb.AddItem "JAN13 (EAN)"
  korCmb.AddItem "JAN8 (EAN)"
  korCmb.AddItem "PDF417"
  
  Dim FName As String
  Dim FSize As Byte
       
End Sub

