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!!! :sad:

Recommended Answers

All 2 Replies

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....

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.