FIX: No Out of Memory Error Generated with Text Box > 32K

Last reviewed: October 30, 1997
Article ID: Q94698
2.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Microsoft Visual Basic programming system for Windows, version 2.0

SYMPTOMS

The text box in Microsoft Visual Basic version 2.0 for Windows has the capacity to hold up to 32K of text. The problem is that when you try to place more than 32K of text in a text box, no error is generated and no text is added to the text box.

STATUS

Microsoft has confirmed this to be a bug in Microsoft Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Visual Basic or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. Form1 is created by default.

  2. Add a text box (Text1) to Form1.

  3. Set the Multiline property of Text1 to True.

  4. Set the Scrollbars property of Text1 to 2 - Vertical.

  5. Add the following code to the Form_Click event procedure in Form1:

       Sub Form_Click ()
          For i% = 1 to 10000
             text1.seltext = Format$(i%, "00000") + Chr$(13) + Chr$(10)
          Next i%
       End Sub
    
    

  6. Press the F5 key to run the procedure and click the Form1 form.

You will see text being added to the text box, but the adding of the text (numbers) stops around the number 04285 and no error is generated. Visual Basic should give you an Out of Memory error message, but it doesn't.


Additional reference words: buglist2.00 fixlist3.00 2.00 3.00
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsStd
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.