Click here to Skip to main content
15,896,730 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Class Pin
Dave Kreskowiak14-Apr-04 13:57
mveDave Kreskowiak14-Apr-04 13:57 
GeneralRe: Class Pin
trg503014-Apr-04 19:23
trg503014-Apr-04 19:23 
GeneralGetting BIOS Serial Pin
Troyax14-Apr-04 7:07
Troyax14-Apr-04 7:07 
GeneralRe: Getting BIOS Serial Pin
Dave Kreskowiak14-Apr-04 8:50
mveDave Kreskowiak14-Apr-04 8:50 
GeneralWebservices: can't see methods Pin
Medieval Knight14-Apr-04 5:00
sussMedieval Knight14-Apr-04 5:00 
GeneralBinary Files Comparison Pin
mayVB613-Apr-04 22:22
mayVB613-Apr-04 22:22 
GeneralRe: Binary Files Comparison Pin
Dave Kreskowiak14-Apr-04 2:45
mveDave Kreskowiak14-Apr-04 2:45 
GeneralRe: Binary Files Comparison Pin
mayVB614-Apr-04 17:00
mayVB614-Apr-04 17:00 
Private Sub CompareBinaryFiles(t1 As String, t2 As String)

Open txtOne.Text For Binary Access Read As #1
Open txtTwo.Text For Binary Access Read As #2

Dim pos As Long
Dim differencepercentage As Single
Dim o As Byte, t As Byte
Dim textOne As String, textTwo As String
Dim totalcount As Integer, differencecount As Integer

'need to initalize before computing
totalcount = 0
differencecount = 0

On Error GoTo exit2

'loop the file until EOF
Do Until EOF(2)

'count + 1 whenever the file loop
totalcount = totalcount + 1

'calculating the positioning of the file
pos = pos + 1
pos2 = pos2 + 1
If pos > txtOne Then GoTo exit2
Get #1, pos, t
Get #2, pos, o

'add the countdiffernces by 1
If t <> o Then lstMistakes.AddItem "Byte " & pos & " - " & t & " (" & o & ")"
If t <> o Then differencecount = differencecount + 1

'DoEvents
If pos Mod 256 = 0 Then PB.Value = pos
Loop
GoTo esc
exit2:
If pos2 = cut Then GoTo esc
lstMistakes.AddItem "---File ended at byte " & pos2 & " ---"
esc:
lstMistakes.Visible = True
PB.Visible = False
Close #1
Close #2
'calculating the percentage of the differnces of files
On Error GoTo errhandler

'differencepercentage = (differencecount / totalcount) * 100
List2.AddItem "Binary Compare Similarity :" & 100 - differencepercentage & " %"
List2.AddItem "Binary Compare diffences :" & differencepercentage & " %"
Exit Sub

errhandler:
Resume Next
End Sub

Is this the way to do the binary files comparison? But when i include this function my normal text files comparison will have a extra line at the end of each documents!
GeneralAdd-in problem opening word file with write permission Pin
skoizumi2911013-Apr-04 15:03
sussskoizumi2911013-Apr-04 15:03 
GeneralRe: Add-in problem opening word file with write permission Pin
John Kuhn13-Apr-04 15:55
John Kuhn13-Apr-04 15:55 
GeneralRe: Add-in problem opening word file with write permission Pin
skoizumi2911014-Apr-04 15:39
sussskoizumi2911014-Apr-04 15:39 
GeneralRe: Add-in problem opening word file with write permission Pin
John Kuhn14-Apr-04 15:55
John Kuhn14-Apr-04 15:55 
GeneralRe: Add-in problem opening word file with write permission Pin
skoizumi2911015-Apr-04 10:18
sussskoizumi2911015-Apr-04 10:18 
GeneralVB6 Pin
vikasg197713-Apr-04 14:04
vikasg197713-Apr-04 14:04 
GeneralRe: VB6 Pin
John Kuhn13-Apr-04 16:03
John Kuhn13-Apr-04 16:03 
GeneralRe: VB6 Pin
T Manjaly15-Apr-04 12:54
T Manjaly15-Apr-04 12:54 
GeneralImage Processing using VB.NET Pin
Funkytroll0113-Apr-04 11:58
Funkytroll0113-Apr-04 11:58 
GeneralRe: Image Processing using VB.NET Pin
Dave Kreskowiak13-Apr-04 12:52
mveDave Kreskowiak13-Apr-04 12:52 
GeneralRe: Image Processing using VB.NET Pin
roopeshsheth15-Apr-04 7:36
roopeshsheth15-Apr-04 7:36 
GeneralRe: Image Processing using VB.NET Pin
Dave Kreskowiak15-Apr-04 16:16
mveDave Kreskowiak15-Apr-04 16:16 
GeneralFinding network computers Pin
Member 57424713-Apr-04 10:30
Member 57424713-Apr-04 10:30 
GeneralRe: Finding network computers Pin
Dave Kreskowiak13-Apr-04 13:01
mveDave Kreskowiak13-Apr-04 13:01 
Generaldeveloping a custom metadata editor for ArcCatalog using VB.NET and COM Pin
abhishk2001@yahoo.com13-Apr-04 10:14
abhishk2001@yahoo.com13-Apr-04 10:14 
GeneralLinks in a RTF Document Pin
mcd242413-Apr-04 3:09
mcd242413-Apr-04 3:09 
GeneralPrint Preview Control problem. Pin
emmshazi13-Apr-04 3:08
emmshazi13-Apr-04 3:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.