All pastes #421183 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-02 17:55 UTC
rendered paste body
Try
            ' Write a line to the serial port
            Dim hexstr As String = ""
            Dim s As String
            Dim v As Int16 = 0
            s = textBox1.Text

            For Each c As Char In s
                v = CShort(Format(c))
                hexstr = hexstr + v.ToString
            Next
            SerialPort1.WriteLine(hexstr)
            textBox1.Text = ""
        Catch ex As System.Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub