I encountered a few strange questions when I used RichTextBox.
◆ Problem 1:
When I copy data from MS-Word to RichTextBox, I encountered the following three questions:
(1)The image color is changed
(2) The edge of the picture appears jagged
(3) The Unicode characters can't be displayed
◆ Problem 2:
RichTextBox SelStart, SelLength and SelText are sometimes incorrect.
◆ Problem 3:
RichTextBox will have a memory leak when we frequently use the SelStart, SelLength and SelText properties.
(1) In XP, whether it is in VB6 IDE environment or compiled into an executable file, RichTextBox has memory leak problem (at least on my computer). When click the Problem3 button, the test program will run out of all the memory of the computer.
(2) In Win10, in the VB6 IDE environment, RichTextBox does not happen memory leak. However, when compiled into an executable program, RichTextBox has memory leak problem and will run out of all the memory of the computer and raise 'Automation error'.
◆ Problem 4:
If we use Ms Word to open sample.rtf, the pictures are not distorted. If we use RichTextBox to open sample.rtf, the pictures are distorted. In fact, all information about anti-aliasing is present in the rtf, but how can we find and use this information ?
See the test program for details. Thanks very much.