I’ve been working on this problem for two and a half weeks. I’ve debugged the code back and forth many times. It’s difficult to do when it involves the mouse cursor, because switching from the program to the debugger causes a mouse event.
Once I reach a point like this, and find I cannot get any further by debugging, I usually resort to creating a very small test program that replicates the problem. Sometimes doing so shows immediately what the problem is, and sometimes the problem won’t happen in a small program - which also can be good because that can give you clues.
Building the small program only took an hour. It perfectly represents the problem. I’ve sent it to the TRichview forum, and hopefully Sergey will have a solution for me.
In the meantime, I am now 2 1/2 weeks behind where I wanted to be, so I’ll start back on the rest of my ToDo items.