Hi experts, I have a program that moves some data around between TRichEdit's in order to produce and output a report, and I use the CopyToClipboard and PasteFromClipboard methods. Sometimes (not always) I encounted "Cannot open clipboard" runtime errors which shut down my program. Here's an example of how my code:
//create the temp RichEdit again and add the strings
RE.text := reportstr;
end; // CopyStringsToClip
I'm now seeing that there are TClipboard methods Open and Close. Would using these solve my problem? If so, can I just place one TClipboard.Open at the very start just before I do all my clipboard shenanigans, and a TClipboard.Close right after I finish... or is there more to it than that?
P.S: I'm using Delphi 7