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

ID: Q76635


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for Windows, versions 2.0, 3.0
  • Microsoft Visual Basic programming system for Windows, version 1.0


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

  1. In Visual Basic, place a text box (Text1) on a new form, and change the MultiLine property of Text1 to True.


  2. Place the following statement in the Form_Click event procedure:
    
       text1.text=string$(32767,"X") 


  3. From the Run menu, choose Start.


  4. 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 :
Version : WINDOWS:1.0,2.0,3.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 25, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.