Microsoft KB Archive/76635

= PRB: Long String Assigned to Multiline Text Box Seems to Hang =

Article ID: 76635

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q76635



SUMMARY
On some computers, when you assign a long text string to a multiline text box, it takes a long time (1 to 2 minutes) to update. This may give the impression that Visual Basic is hung, when in fact it is not.



MORE INFORMATION
Windows has a problem inserting line breaks in multiline text boxes. The amount of time needed to complete the process grows exponentially as the length of the string increases.

Steps to Reproduce Problem
 In Visual Basic, place a text box (Text1) on a new form, and change the MultiLine property of Text1 to True.  Place the following statement in the Form_Click event procedure: text1.text=string$(32767,&quot;X&quot;)  From the Run menu, choose Start. Click the form.

The application may now take up to two minutes to respond to any other events because it is still executing the text1.text assignment.

Additional query words: 2.00 3.00

Keywords: kbprb KB76635

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.