943,796 Members | Top Members by Rank

Ad:
Oct 2nd, 2006
0

compare two strings or compare two files?

Expand Post »
In my form I have two rich text boxes.In both of them I put two different text files(.txt or .rtf).I looking for some code to compare them, and to have the result as marked differences into the second rich text box.How I have to compare them-as strings or as files? And how I can use mid$ to compare them letter by letter to have the right positions of differences?
Thanks in advance!!!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bobbymusic is offline Offline
3 posts
since Oct 2006
Oct 3rd, 2006
0

Re: compare two strings or compare two files?

How, exactly, do you want to present the differences to the user? By, like, a string position (character 3 of file A and character 3 of B are different)? I can figure out how to pull this off if I know how you want to lay it out....
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Oct 5th, 2006
0

Re: compare two strings or compare two files?

Click to Expand / Collapse  Quote originally posted by Comatose ...
How, exactly, do you want to present the differences to the user? By, like, a string position (character 3 of file A and character 3 of B are different)? I can figure out how to pull this off if I know how you want to lay it out....
Actually ,the differences have to be shown in red color and if [Len(Text1.Text)<>Len(Text2.Text)] i.e. there's one or two words more in Text2,then these words have to be shown in red as differences etc.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bobbymusic is offline Offline
3 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Searching a record in 3 tables
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: ActiveX DLL - Permission Denied Error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC