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

ID Number: Q79030

1.00

WINDOWS

buglist1.00 docerr

Summary:

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.

Microsoft has confirmed this to be a problem in Visual Basic

programming system version 1.0 for Windows. We are researching this

problem and will post new information here as it becomes available.

Note also that page 11 of the "Microsoft Visual Basic: Language

Reference" incorrectly lists the Height property of the drive list box

as being Read/Write at run time, but Height is actually Read-Only at

run time.

More Information:

Note: Neither the directory list box nor the file list box are

affected by run-time resizing.

Steps to Reproduce Problem

--------------------------

1. Click on 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

you desire. At run time, the drive list box will correctly open

when you click the down arrow.

2. Create three command buttons on the form. Caption them "Narrow,"

"Wider," and "Restore."

3. 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

4. Run the example.

5. Open the drive list box. Click on Narrow or Wider.

6. Try to open the drive list box again. It fails to open.

7. Click Restore. Again try to open the drive list box. It fails to

open.

Additional reference words: 1.00