ListView大图标显示时如何让各项不能拖拽
Fxx 2006-04-09 09:09:59 我的目的:ListView以Icon显示,不能拖动,并且双击选中的项可以显示另一个窗体
遇到的问题
用下面的代码可以让Item不能拖动(不太好看,打家有没有更好的办法)
private sub listview1_MouseMove(Index As Integer,Button As Interger,Shift As Integer,x As Single,y As Single)
if Button=vbLeftButton then
if not ListView1.SelectedItem is nothing Then
ListView1.DragIcon=ListView1.SelectedItem.CreateDragImage
ListView1.Drag vbBeginDrag
End if
end if
end sub
不能拖拽后,点击其中的项目显示另一个窗体,发现窗体关闭后又可以拖动了