[VB6] BigTextBox - Log Large Amounts of Text to a TextBox
Nothing seems to spook the herd here like using external libraries.
"Sweet sacred boa of Western and Eastern Samoa!" they gasp. "A dependency!"
The reason for this fear escapes me, since Registration Free COM has eliminated most of the bottlenecks for almost a decade. Still, suggesting the use of a RichTextBox for logging and displaying text beyond 32K characters does add another large library to distribute.
Why not just use the intrinsic TextBox control? Well some manipulations via its character position and size properties can cause grief over 65,535 characters. And when the text gets long, the concatenation is a killer so you need those properties.
But by sending a few strategic messages to a TextBox control's underlying control window we can get around many of these limitations. The attached demo Project shows how to go about it.