Click here to Skip to main content
15,897,226 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 22:38
TeiUKei14-May-08 22:38 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
Ajay.k_Singh14-May-08 22:50
Ajay.k_Singh14-May-08 22:50 
GeneralRe: Select Multiple File in Single Open File Dialog Box Pin
TeiUKei14-May-08 22:59
TeiUKei14-May-08 22:59 
QuestionCna we have Nested Try and Catch IN VB 2005 Pin
nishkarsh_k14-May-08 20:22
nishkarsh_k14-May-08 20:22 
AnswerRe: Cna we have Nested Try and Catch IN VB 2005 Pin
Mycroft Holmes14-May-08 20:44
professionalMycroft Holmes14-May-08 20:44 
QuestionCompare text files using VB 2008 Pin
mahan14-May-08 16:44
mahan14-May-08 16:44 
AnswerRe: Compare text files using VB 2008 Pin
Christian Graus14-May-08 17:03
protectorChristian Graus14-May-08 17:03 
AnswerRe: Compare text files using VB 2008 Pin
Rajesh Anuhya14-May-08 18:50
professionalRajesh Anuhya14-May-08 18:50 
Function for Comparing Two Files

Source from .net snippet.


Private Function CompareFiles(ByVal file1 As String, ByVal file2 As String) As Boolean
'Set to true if the files are equal; false otherwise
Dim filesAreEqual As Boolean = False

With My.Computer.FileSystem
' Ensure that the files are the same length before comparing them line by line
If .GetFileInfo(file1).Length = .GetFileInfo(file2).Length Then
Using file1Reader As New FileStream(file1, FileMode.Open), _
file2Reader As New FileStream(file2, FileMode.Open)
Dim byte1 As Integer = file1Reader.ReadByte()
Dim byte2 As Integer = file2Reader.ReadByte()
' If byte1 or byte2 is a negative value, we have reached the end of the file
While byte1 > 0 And byte2 > 0
If (byte1 <> byte2) Then
filesAreEqual = False
Exit While
Else
filesAreEqual = True
End If
'Read the next byte
byte1 = file1Reader.ReadByte()
byte2 = file2Reader.ReadByte()
End While
End Using
End If
End With

Return filesAreEqual
End Function

Rajesh B --> A Poor Workman Blames His Tools <--

GeneralRe: Compare text files using VB 2008 Pin
Christian Graus14-May-08 19:58
protectorChristian Graus14-May-08 19:58 
Questionsend data to selected ip address problem Pin
shee_dee8614-May-08 15:30
shee_dee8614-May-08 15:30 
AnswerRe: send data to selected ip address problem Pin
Christian Graus14-May-08 15:37
protectorChristian Graus14-May-08 15:37 
QuestionGuide to multiple client Pin
shee_dee8614-May-08 14:51
shee_dee8614-May-08 14:51 
AnswerRe: Guide to multiple client Pin
Christian Graus14-May-08 15:00
protectorChristian Graus14-May-08 15:00 
GeneralRe: Guide to multiple client Pin
shee_dee8614-May-08 15:23
shee_dee8614-May-08 15:23 
GeneralRe: Guide to multiple client Pin
Christian Graus14-May-08 15:36
protectorChristian Graus14-May-08 15:36 
QuestionWant to do a pagesetup for the Excel file in VB Pin
sant_leo14-May-08 8:08
sant_leo14-May-08 8:08 
QuestionHow to use a int128 in VB.net? Pin
kristofvanderhaeghen14-May-08 7:44
kristofvanderhaeghen14-May-08 7:44 
AnswerRe: How to use a int128 in VB.net? Pin
Dave Kreskowiak14-May-08 13:46
mveDave Kreskowiak14-May-08 13:46 
AnswerRe: How to use a int128 in VB.net? Pin
kristofvanderhaeghen15-May-08 3:00
kristofvanderhaeghen15-May-08 3:00 
QuestionWiting at the specified position a text file Pin
en.Mahdi14-May-08 6:15
en.Mahdi14-May-08 6:15 
AnswerRe: Witing at the specified position a text file Pin
Guffa14-May-08 7:13
Guffa14-May-08 7:13 
GeneralRe: Witing at the specified position a text file Pin
Mycroft Holmes14-May-08 14:42
professionalMycroft Holmes14-May-08 14:42 
GeneralRe: Witing at the specified position a text file Pin
Guffa15-May-08 1:02
Guffa15-May-08 1:02 
AnswerRe: Witing at the specified position a text file Pin
Ashfield14-May-08 21:13
Ashfield14-May-08 21:13 
GeneralRe: Witing at the specified position a text file Pin
Guffa15-May-08 1:05
Guffa15-May-08 1:05 

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.