Hi
Maybe I'm just to tired to see what I'm missing, but I could need some help with this.
I have 2 textboxes, one with hex data and one which I convert to ASCII. The first textbox is sized to fit 16 chr, this will be equal to 8 Ascii. I wan't my code to convert line by line. Which means that max chr in a line for textbox2 should be 8. Maybe I should use a StreamWriter, instead of my code?
Code:Public Class Form1 Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim hex As String = TextBox1.Text Dim hexNumber As Integer Dim i As Integer For i = 0 To hex.Length - 1 Step 2 hexNumber = Convert.ToInt32(TextBox1.Text.Substring(i, 2), 16) For Each line As String In TextBox1.Lines TextBox2.AppendText(Chr(hexNumber & vbCrLf)) Next Next End Sub End Class




Reply With Quote