BUG: Cannot Use Drag Method to Drag Multiple Selections from ListView Control (269783)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q269783 SYMPTOMS
If you use the Drag method to implement the drag-and-drop feature for a ListView control, the application works as expected when you use the Visual Basic 5.0 version of the ListView control. However, when you use the Visual Basic 6.0 version of the ListView control, you can only drag one item, even if you select multiple items.
CAUSE
When the Drag method is called, the ListView control updates the selection state so that only the item that is clicked most recently is selected.
RESOLUTION
To work around this problem, store the selection information before the Drag method is called, and restore the selection state after the Drag method is issued. You need to restore the selection state after the function that calls the Drag method exits. For sample code that demonstrates this workaround, see the "More Information" section.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 10/15/2002 |
---|
Keywords: | kbBug kbCodeSnippet kbCtrl kbDragDrop kbDSupport kbListView KB269783 |
---|
|