BUG: You cannot load images in the ImageList control by directly assigning the ImageStream property from one ImageList to another (814349)
The information in this article applies to:
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Basic 2005
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual C# 2005, Express Edition
- Microsoft Visual C# .NET (2003)
SYMPTOMSIf you try to load images in the ImageList control by directly assigning the ImageStream property from one ImageList to another, the assignment fails. CAUSEThe ImageStream property obtains the handle to the ImageListStreamer class that is associated with this ImageList. The ImageListStreamer is the data portion of the ImageList. When you perform the assignment, the ImageListStreamer handle is not passed to another instance of an ImageList as detailed in the corresponding documentation. Therefore, images
are not loaded.WORKAROUNDTo work around this bug, directly assign the ImageList instance instead of setting the ImageStream property, as in the following code: Visual Basic .NET or Visual Basic 2005ImageList2=ImageList1 Visual C# .NET or Visual C# 2005imageList2=imageList1; STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
| Modification Type: | Minor | Last Reviewed: | 10/3/2006 |
|---|
| Keywords: | kbvs2005applies kbvs2005swept kbWindowsForms kbCtrl kbImgList kbControl kbBug KB814349 kbAudDeveloper |
|---|
|