Results 1 to 11 of 11

Thread: Load & Display a binary file

Threaded View

  1. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Load & Display a binary file

    This part in particular is not really a big deal. You can just create a BinaryReader something like this:
    vb.net Code:
    1. Using reader As New IO.BinaryReader(IO.File.OpenRead("file path here"))
    2.     'Read file here.
    3. End Using
    and inside the Using block you call methods like ReadChars and ReadInt32.

    Note that if you want to read text that is not prefixed with its length then you need to call ReadChars, NOT ReadString, and then convert the Char array returned to a String.
    Last edited by jmcilhinney; Feb 4th, 2008 at 09:46 PM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width