I
id10t error
Can someone please point me in the right direction for printing to a
zebra QL320 printer. I have the drive and Label Vista installed. I can
print a label with a barcode using the print on label Vista but who do
i do this from vb.net 2005. I have the following code but it only
prints out garbage chacters. Is there a better way of printing a
label?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim p As System.IO.Ports.SerialPort
Dim sendValue As String = ""
Dim test As String = "! 0 100 100 50 1"
Dim test2 As String = "VB 128 1 3 50 50 175 123456789"
Dim test3 As String = "T 7 0 24 171 Barcode Value is
123456789"
Dim test4 As String = "FORM"
Dim test5 As String = "PRINT"
Try
p = New System.IO.Ports.SerialPort("COM1")
p.WriteTimeout = 500
p.ReadTimeout = 500
Try
p.Open()
p.WriteLine(test & "CR/LF")
p.WriteLine(test2 & "CR/LF")
p.WriteLine(test3 & "CR/LF")
p.WriteLine(test4 & "CR/LF")
p.WriteLine(test5 & "CR/LF")
Catch ex As Exception
MsgBox(ex.Message)
Finally
If p.IsOpen Then p.Close()
p.Dispose()
p = Nothing
End Try
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
zebra QL320 printer. I have the drive and Label Vista installed. I can
print a label with a barcode using the print on label Vista but who do
i do this from vb.net 2005. I have the following code but it only
prints out garbage chacters. Is there a better way of printing a
label?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim p As System.IO.Ports.SerialPort
Dim sendValue As String = ""
Dim test As String = "! 0 100 100 50 1"
Dim test2 As String = "VB 128 1 3 50 50 175 123456789"
Dim test3 As String = "T 7 0 24 171 Barcode Value is
123456789"
Dim test4 As String = "FORM"
Dim test5 As String = "PRINT"
Try
p = New System.IO.Ports.SerialPort("COM1")
p.WriteTimeout = 500
p.ReadTimeout = 500
Try
p.Open()
p.WriteLine(test & "CR/LF")
p.WriteLine(test2 & "CR/LF")
p.WriteLine(test3 & "CR/LF")
p.WriteLine(test4 & "CR/LF")
p.WriteLine(test5 & "CR/LF")
Catch ex As Exception
MsgBox(ex.Message)
Finally
If p.IsOpen Then p.Close()
p.Dispose()
p = Nothing
End Try
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class