FIX: Pull-Down on Drive Box Disabled When Change Width of Box

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

The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

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

SYMPTOMS

If you change the Width property of a drive list box at run time, the pull-down list of drives no longer work.

WORKAROUND

Add the following code to the form's click event procedure to work around the problem:

Sub Form_Click ()
   Drive1.Width = Drive1.Width * 2
   Drive1.Refresh                     '* fixes the problem
End Sub

STATUS

Microsoft has confirmed this to be a bug in Microsoft Visual Basic programming system for Windows, versions 1.0 and 2.0. This bug was corrected in Microsoft Visual Basic version 3.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start Visual Basic. Form1 is created by default.

  2. Add a drive list box to Form1.

  3. In the Click event of Form1, add the following code:

       Sub Form_Click ()
          Drive1.Width = Drive1.Width * 2
       End Sub
    
    

  4. Run the application (press F5).

  5. Click the down arrow on the drive box to display the list.

  6. Choose a drive; everything works as it should.

  7. Click Form1; the width of the drive box changes.

  8. Click the down arrow on the drive box.

Note that the list fails to display.


Additional reference words: buglist1.00 buglist2.00 fixlist3.00 1.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.