Microsoft KB Archive/79030

= FIX: Visual Basic List Box Won't Open if Resized at Run Time =

Article ID: 79030

Article Last Modified on 11/18/2003

-

APPLIES TO


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

-



This article was previously published under Q79030



SYMPTOMS
When you click the down arrow of the drive list box control, the drive list box will not open if it has been resized at run time. The Width property is Read/Write at run time. However, if it is changed at run time, the drive list box won't open. This is true even if it is restored to its original value before attempting to open it.

Note also that Page 11 of the &quot;Microsoft Visual Basic: Language Reference&quot; version 1.0, says the Height property of the drive list box is Read/Write at run time. Height is actually Read-Only at run time.



STATUS
Microsoft has confirmed this to be a bug in the products listed above. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.



MORE INFORMATION
Note that neither the directory list box nor the file list box are affected by run-time resizing.

Steps to Reproduce Problem
 Click the drive list box control icon on the Toolbox. Draw a drive list box on the form. Resize the drive list box to any size. At run time, the drive list box will correctly open when you click the down arrow. Add three command buttons to the form, giving them these captions: Narrow, Wider, and Restore.  Insert the following code:

Note: The example assumes a starting dimension of 2055 wide (user alterable) by 315 high (the standard height in twips). Sub Command1_Click drive1.WIDTH = 1025            ' Narrow End Sub

Sub Command2_Click drive1.WIDTH = 4110            'Wider End Sub

Sub Command3_Click drive1.WIDTH = 2055            'Restore End Sub  Run the example. Open the drive list box. Click the Narrow or Wider button. Try to open the drive list box again. It fails to open.</li> Click the Restore button. Again try to open the drive list box. It fails to open.</li></ol>

Additional query words: buglist1.00 docerr buglist2.00 fixlist3.00 2.00 3.00

Keywords: kbbug kbfix KB79030

-

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

© Microsoft Corporation. All rights reserved.