Microsoft KB Archive/192253

= BUG: ImageList: Can't Insert Multiple Images from Root Directory =

Article ID: 192253

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q192253



SYMPTOMS
When adding images to the ImageList control at design-time, you may encounter the following error message when the files you are trying to add are located in the root directory of a drive:

"Error #5"



CAUSE
From the Insert Picture command of the ImageList property page, the Select Picture dialog allows you to select multiple files to add to the control. If these files are located in the root directory of a drive, the aforementioned error may occur.

This problem occurs on Windows 95/98 only.



RESOLUTION
To avoid the error, select only one picture at a time.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior

 * 1) Create a new Standard EXE project in Visual Basic. Form1 is created by default.
 * 2) Select Components from the Project menu, and check the "Microsoft Windows Common Controls" to add this component to your toolbox.
 * 3) Place an instance of the ImageList control on Form1. Right-click on the control to bring up its context menu, and select properties option to display the control's property page.
 * 4) Select the Images tab, and click the Insert Picture button. A dialog is displayed asking which file(s) you want to insert.
 * 5) Find two image files located in the root directory of a drive, and select both. Click Open to add the pictures. You will get the error message telling you that the insert failed.

Keywords: kbbug kbimglist kbcmnctrls kbpending KB192253

-

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

© Microsoft Corporation. All rights reserved.