Microsoft KB Archive/149322

= FIX: Tag Changed Incorrectly After Linking to Invalid ImageList =

Article ID: 149322

Article Last Modified on 7/14/2004

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition

-



This article was previously published under Q149322



SYMPTOMS
Setting the Icons property of a ListView control to an invalid ImageList control will correctly result in error '35613 - Uninitialized ImageList'. However, if the Listview.Icons.Tag property is examined after this aborted attempt has been made, it will have been set to the tag of the ImageList control. It should be blank after an unsuccessful attempt to link to an ImageList control.



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



Steps to Reproduce Behavior
 Start Visual Basic 4.0. Form1 is created by default. Add an ImageList control, a command button, and a ListView control to Form1.  Add this code to the form: Private Sub Command1_Click On Error Resume Next

ListView1.Icons = ImageList1 MsgBox "Tag after linking to invalid imagelist: " & _ ListView1.Icons.Tag End Sub

Private Sub Form_Load ImageList1.Tag = "ImageList1" End Sub  Press F5 or select Start from the Run menu to run the application. Click the command button. The message box that is displayed will indicate that the tag for the ImageList linked to the ListView control is 'ImageList1'; it should be blank.

Additional query words: kbVBp400bug kbVBp600fix kbVBp kbdsd kbDSupport kbCtrl

Keywords: kbbug kbfix kbvbp600fix KB149322

-

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

© Microsoft Corporation. All rights reserved.