Question : vb.net - hex data from textbox

hello there,
I would like to make a little change to the code that I have bellow to make it work with the function WriteData..
when I was using output.WriteByte it was working fine but now its not.. how can I make it work good again?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
Option Explicit On

Public Class Form1
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim hexLine As String
        Dim strData As String = ""

        hexLine = FixStr(textBox1.Text)
        Dim StrLen As Integer = hexLine.Length
        Dim a As Integer = 0

        While a < StrLen
            strData = strData & Byte.Parse(hexLine.Substring(a, 2), System.Globalization.NumberStyles.HexNumber)
            'output.WriteByte(Byte.Parse(hexLine.Substring(a, 2), System.Globalization.NumberStyles.HexNumber))
            a = a + 2
        End While

        Call WriteData(strData)
    End Sub

    Public Sub WriteData(ByVal strData As String)
        FileOpen(5, System.AppDomain.CurrentDomain.BaseDirectory & "hex_final.txt", OpenMode.Output)
        PrintLine(5, strData)
        FileClose(5)
    End Sub

    Public Function FixStr(ByRef TheString As String) As String
        FixStr = TheString
        FixStr = Replace(FixStr, vbCrLf, "")
        FixStr = Replace(FixStr, vbTab, "")
        FixStr = Replace(FixStr, vbCr, "")
        FixStr = Replace(FixStr, vbLf, "")
        FixStr = Replace(FixStr, " ", "")
    End Function
End Class

Answer : vb.net - hex data from textbox

You say you don't like the line. The line at the small scale of a shirt emblem serves the same function as the words do at a larger scale, that is: Form a line under the logo to give it a visual base and to carry the blue color to another part of the logo. At a larger scale it also provides an opportunity to add some words to describe the services you offer, but this is secondary to the all-important role of enhancing and completing the logo design. It does this by being a line first and foremost, not by being a string of words. Perhaps in my sample image, I made the blue line a little too thick and you would like it better if it were thinner and less noticeable. Or maybe you make a thin rectangle with a blue border. The line already part of your logo design, just make it work for the embroidered emblem by simplifying it into an actual blue line instead of a blue line of text. You can still use the blue line of words on letterheads, or bumper stickers, or the website, or billboards, or whatever is larger than a shirt emblem. If you banished the words forever in lieu of a blue line, I don't think your business would suffer. "IT" kind of says it all.
Random Solutions  
 
programming4us programming4us