VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Sample"
   ClientHeight    =   1245
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4095
   LinkTopic       =   "Form1"
   ScaleHeight     =   1245
   ScaleWidth      =   4095
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Print"
      Height          =   855
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   3855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'SRP-350Plus Sample English Version

Private Sub Command1_Click()
 Dim nResult As Integer
 Dim PrintContent As String
 Dim sCmd As String
  
  
  nResult = OpenUsbPort(3)
   
    If nResult = 1 Then
        
        'Port Open Message
        'MsgBox "Port open!"
         
         
         'Printing Text Content
         PrintContent = "------------------------------------------" + vbCrLf + _
                     " Printer Model : Metapace T-3II" + vbCrLf + _
                     " Prining Order " + vbCrLf + _
                     " Step 1 : Print Content" + vbCrLf + _
                     " Step 2 : Cutting" + vbCrLf + _
                     "------------------------------------------" + vbCrLf
                                  
         'Command
         'Cutting - ASCII   GS  V   m
         '          Decimal 29  86  m
         '          (m =1 or 49 : Partial cut(one point left uncut))
         '          ASCII   GS  V   m   n
         '          Decimal 29  86  m   n
         '          (m =66, 0<=n<=255 : Feeds paper (cutting position +[nX(vertical motion unit)],
         '          and cuts the paper partially (one point left uncut)
         'command string convert decimal to Ascii
         sCmd = Chr(29) & Chr(86) & Chr(66) & Chr(1)
                  
         
         'Print Textbox Text
         'parameter 1 : String to Write(Print), parameter 2 : String Length
         nResult = WriteUSB(PrintContent, LenB(StrConv(PrintContent, vbFromUnicode))) 'nResult = Written Count
         
         'feeds paper and cutting
         nResult = WriteUSB(sCmd, Len(sCmd)) 'nResult = Written Count
        
                
         CloseUsbPort
  Else
    MsgBox "Port Open Failed!"
  End If
    
    
    
End Sub

                                                    
