FIX: CreateDragImage Method in ListView Uses Wrong Icon (172057)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q172057 SYMPTOMS
When dragging a selection from the ListView control, the icon for the first
item in the list is displayed during the drag operation. This problem
occurs when the CreateDragImage method is used.
RESOLUTION
To work around this problem, it is necessary to extract the correct icon
from the image list that provides the icons for the ListView. For example,
if the original line of code reads:
ListView1.DragIcon = ListView1.SelectedItem.CreateDragImage
change it to read:
ListView1.DragIcon= _
ImageList1.ListImages(ListView1.SelectedItem.Index).ExtractIcon
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.
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbbug kbfix KB172057 |
---|
|