none
[HELP] Write textbox Hex to file RRS feed

  • Question

  • Hi all, i need to write the content of textbox3 to a specific offset.

    My read code:

            Using b As New System.IO.BinaryReader(System.IO.File.Open(FileLoc, System.IO.FileMode.Open))
    
                '1Byte
                For offset As Long = &H0 To &H0
                    b.BaseStream.Seek(offset, System.IO.SeekOrigin.Begin)
                    o = b.ReadByte.ToString("X")
                Next
                '2Byte
                For offset As Long = &H1 To &H1
                    b.BaseStream.Seek(offset, System.IO.SeekOrigin.Begin)
                    t = b.ReadByte.ToString("X2")
                Next
                '3Byte
                For offset As Long = &H2 To &H2
                    b.BaseStream.Seek(offset, System.IO.SeekOrigin.Begin)
                    th = b.ReadByte.ToString("X2")
                Next
            End Using
            TextBox3.Text = o & t & th
    How can i write textbox3.text to &H0 offset?

    Monday, June 15, 2015 9:58 PM

Answers