What I do when I need to check if something complicated has been changed is use CRC32 checksums.
You could do a CRC32 checksum of the text you put in the RichEdit form and save it somewhere in a temp variable. When the user is done with the RichEdit, you re-run CRC32 on the RichEdit contents and compare this checksum with the saved one. If they are different, then the text is "dirty" and was modified in some way. If they are the same, then the text was not touched. There are numerous freeware CRC32 functions out there in source code form. You basically seed the function with zero, and then step through the text, one character or byte at a time. When you get to the end of the text, you save that longint value - it is your checksum for the text. CRC32 is very fast on modern computers. Footnote: This same technique works on any data structure, not just text. Hope this helps! Kevin G. McCoy > I hope you can help. I'm writing a program to modify text files. What I do > is load the file in a RichEdit control (set to plain text only), and modify > the data. Then I plan on saving it back out, if there were changes made. > Unless I missed something, I can't find a property that flags this (e.g. > RichEdit1.<whatever>). Then, on top of this, let's say the RichEdit control > had "ZZZ" added to it, then I used CTRL-Z to remove it, which put it back to > the way it was originally loaded. If there is such a property, will it > figure out what it is still the same, since the CTRL-Z removed the "ZZZ"?

