FIX: Bad Text in Long Right-Aligned Labels in Windows ver 3.0

Last reviewed: October 30, 1997
Article ID: Q76515
1.00 2.00 3.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 3.0
- Microsoft Visual Basic programming system for Windows, version 1.0 - Microsoft Windows version 3.0

SYMPTOMS

When you use Visual Basic with Windows version 3.0, the caption of a right-aligned label that is set to a length exceeding 255 characters displays unusual (incorrect) characters. A left-aligned or centered caption displays correctly, and all captions display correctly when using Visual Basic with Windows version 3.1.

STATUS

Microsoft has confirmed this to be a problem in Windows version 3.0. This problem was corrected in Windows version 3.1.

MORE INFORMATION

Steps to Reproduce Problem

  1. In the Visual Basic environment (VB.EXE), place a label on a blank form.

  2. Add the following code to the form's Form_click event procedure:

    Label1.alignment = 1 'right justified Label1.caption = string$ (277, "k") Label1.refresh

  3. From the Run menu, choose Start or press the F5 key.

  4. Click anywhere inside the form except on the label to see unexpected characters appear in the rightmost portion of the caption.


Additional reference words: 1.00 2.00 3.00 garbage corrupted fixlist3.10
KBCategory: kbprg kbbuglist
KBSubcategory: APrgOther
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.