Append a string to a textbox quickly and without flickering

Append a string to a textbox quickly and without flickering

The usual way to append text to a TextBox or a RichTextBox control is to concatenate the current contents with the new string:

Text1.Text = Text1.Text & newString

Here is a different approach, which is slightly faster and causes less flickering:

Text1.SelStart = Len(Text1.Text)Text1.SelText = newString 

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist