FIX: Toolbar Button Count Is Wrong if Image Index is Invalid (150704)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q150704 SYMPTOMS
The Count property value of the Toolbar Buttons collection is not correct
when a button without an image is shown on the Toolbar control.
CAUSE
This behavior occurs if an Invalid image parameter is used with the Add
method on an ImageList control. The ImageList control supplies the images
for the buttons on the Toolbar control.
RESOLUTION
Use a valid Image index number.
-or-
If you want a button to show without an image, trap the error and leave
out the Image parameter in the Add method.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug has been fixed in Visual Basic
5.0.
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbBug kbfix kbVBp500fix KB150704 |
---|
|