| | |
Reading the first four bytes of a (binary) files?
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2002
Posts: 461
Reputation:
Solved Threads: 56
Try this:
VB.NET Syntax (Toggle Plain Text)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Text = String.Empty Using fs As New FileStream("c:\test.txt", FileMode.Open) fs.Position = 0 Using br As New BinaryReader(fs) For x As Int16 = 0 To 3 TextBox1.Text &= Asc(br.ReadChar) & " " Next End Using End Using End Sub
Wayne
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
![]() |
Similar Threads
- Binary File IO (C#)
- Reading Binary Files in VB (Visual Basic 4 / 5 / 6)
- Need help with Binary files and data types in VB6 (Visual Basic 4 / 5 / 6)
- Read content of *.dat (Java)
- Problems reading from files (C)
- Error reading in file in binary mode (C++)
Other Threads in the VB.NET Forum
- Previous Thread: Date conversion
- Next Thread: Crystal Report...can anyone help
| Thread Tools | Search this Thread |
"crystal .net 2008 access add advanced application array assignment basic beginner box browser button buttons center click client code combo convert cpu cuesent data database datagrid datagridview datetimepicker designer dissertation dissertations dissertationtopic dosconsolevb.net eclipse editvb.net employees excel exists firewall forms html images isnumericfuntioncall listview map math memory mobile module msaccess mssqlbackend mysql navigate net number opacity open pan pdf picturebox picturebox2 port print printpreview record regex reuse right-to-left save search serial settings socket sorting sqldatbase sqlserver storedprocedure temp textbox timer transparency txttoxmlconverter upload useraccounts usercontol vb vb.net vb.nettoolboxvisualbasic2008sidebar vba vbnet vista visual visualbasic visualbasic.net visualstudio.net web winsock wpf wrapingcode xml






