Click here to Skip to main content
15,666,926 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionTo get the contionus Bill Number Pin
Annapurna anu2-Jun-17 20:18
Annapurna anu2-Jun-17 20:18 
AnswerRe: To get the contionus Bill Number Pin
Richard MacCutchan2-Jun-17 22:22
mveRichard MacCutchan2-Jun-17 22:22 
SuggestionRe: To get the contionus Bill Number Pin
Richard Deeming5-Jun-17 8:32
mveRichard Deeming5-Jun-17 8:32 
AnswerRe: To get the contionus Bill Number Pin
jsc4228-Jul-17 7:41
professionaljsc4228-Jul-17 7:41 
QuestionNeed real time list of on/off computers on lan amongst other things Pin
Member 130478152-Jun-17 19:13
Member 130478152-Jun-17 19:13 
AnswerRe: Need real time list of on/off computers on lan amongst other things Pin
OriginalGriff2-Jun-17 19:18
mvaOriginalGriff2-Jun-17 19:18 
AnswerRe: Need real time list of on/off computers on lan amongst other things Pin
Dave Kreskowiak3-Jun-17 5:19
mveDave Kreskowiak3-Jun-17 5:19 
QuestionBarcode commands to Zebra printer Pin
Randy Crockett1-Jun-17 13:34
Randy Crockett1-Jun-17 13:34 
I have a Zebra printer that I need to send a character array to, so that it generates a barcode.
I have text and font maping working, by using a RichTextBox and using the Windows PrintDialog.
To send a barcode, I need to send something like this: "^XA^BY8,0^FT124,209^BON,8,N,0,N,1,^FDBase Material^FS^XZ"

The Printer is on a USB port ("USB002") and does not take the SerialPort.Open() command.
Here is my code, which works for other items on USB if I set the SerialPort.PortName = "COM1", just doesn't work for this printer...I'm out of ideas:

Try
                SerialPort1.Open()
                If Me.SerialPort1.IsOpen() Then

                    Dim buf(Command.Length) As Byte
                    For i As Integer = 0 To (Command.Length - 1)
                        buf(0) = Asc(Mid(Command, 1, 1))
                    Next
                    ' send to Printer
                    Me.SerialPort1.ReadExisting()
                    Me.SerialPort1.Write(buf, 0, Command.Length())

                    ' wait for response
                    Dim ReturnValue As Integer = -99999

                    Dim start_time As Integer = My.Computer.Clock.TickCount
                    Do Until (Me.SerialPort1.BytesToRead >= 8 Or DemoMode = True)
                        If My.Computer.Clock.TickCount > start_time + 1000 Then
                            DemoMode = True
                            MessageBox.Show("Printer Meter Timed Out")
                            Return ReturnValue
                            Exit Function
                        End If
                    Loop

                    Dim Results As String = Me.SerialPort1.ReadExisting()
                    Dim length = Results.Length()
                    If length < 8 Then
                        MessageBox.Show("Bad Value Sent To Printer")
                        Return True
                    End If
                End If
            Catch ex As Exception
                MessageBox.Show(ex.ToString())
            End Try

SuggestionRe: Barcode commands to Zebra printer Pin
Ralf Meier1-Jun-17 19:41
professionalRalf Meier1-Jun-17 19:41 
GeneralRe: Barcode commands to Zebra printer Pin
Randy Crockett2-Jun-17 8:05
Randy Crockett2-Jun-17 8:05 
AnswerRe: Barcode commands to Zebra printer Pin
Richard Deeming2-Jun-17 1:11
mveRichard Deeming2-Jun-17 1:11 
GeneralRe: Barcode commands to Zebra printer Pin
Randy Crockett2-Jun-17 8:06
Randy Crockett2-Jun-17 8:06 
Questionsending message plugins Pin
Member 1322979929-May-17 14:50
Member 1322979929-May-17 14:50 
AnswerRe: sending message plugins Pin
Richard MacCutchan29-May-17 20:49
mveRichard MacCutchan29-May-17 20:49 
AnswerRe: sending message plugins Pin
ZurdoDev2-Jun-17 3:16
professionalZurdoDev2-Jun-17 3:16 
QuestionWanting to use a For Next variable in “xxxx.Rows.Count” Pin
smdevivo23-May-17 16:05
professionalsmdevivo23-May-17 16:05 
AnswerRe: Wanting to use a For Next variable in “xxxx.Rows.Count” Pin
Maciej Los23-May-17 20:55
mveMaciej Los23-May-17 20:55 
QuestionRe: Wanting to use a For Next variable in “xxxx.Rows.Count” Pin
ZurdoDev24-May-17 4:02
professionalZurdoDev24-May-17 4:02 
AnswerRe: Wanting to use a For Next variable in “xxxx.Rows.Count” Pin
Member 834559924-May-17 6:33
Member 834559924-May-17 6:33 
QuestionCreating Access 2007+ files Pin
JR21222-May-17 18:47
JR21222-May-17 18:47 
AnswerRe: Creating Access 2007+ files Pin
Richard MacCutchan22-May-17 21:54
mveRichard MacCutchan22-May-17 21:54 
GeneralRe: Creating Access 2007+ files Pin
JR21224-May-17 1:38
JR21224-May-17 1:38 
AnswerRe: Creating Access 2007+ files Pin
Maciej Los23-May-17 20:25
mveMaciej Los23-May-17 20:25 
QuestionYahoo Finance API Throwing 504 Status? Pin
Member 1321215119-May-17 22:57
Member 1321215119-May-17 22:57 
AnswerRe: Yahoo Finance API Throwing 504 Status? Pin
Afzaal Ahmad Zeeshan19-May-17 23:56
professionalAfzaal Ahmad Zeeshan19-May-17 23:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.