谁能给我一个从PicBox里把图标拖曳到ListView里(或treeview)替換一個其原有Image的例子?

MonkeyLin 2001-11-29 01:21:43
...全文
99 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
progame 2001-12-01
  • 打赏
  • 举报
回复
Private Sub tvfile_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Set tvFile.DropHighlight = tvFile.HitTest(x, y)
If Not tvFile.DropHighlight Is Nothing Then
tvFile.SelectedItem = tvFile.HitTest(x, y)
Set modragNode = tvFile.SelectedItem ' Set the item being dragged.
End If
Set tvFile.DropHighlight = Nothing
End Sub

Private Sub tvfile_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then
mbindrag = True
tvFile.DragIcon = tvFile.SelectedItem.CreateDragImage
tvFile.Drag vbBeginDrag ' Drag operation.
End If
End Sub
progame 2001-12-01
  • 打赏
  • 举报
回复
Private Sub tvfile_DragOver(Source As Control, x As Single, y As Single, State As Integer)
If mbindrag = True Then
Set tvFile.DropHighlight = tvFile.HitTest(x, y)
End If
End Sub
MonkeyLin 2001-11-30
  • 打赏
  • 举报
回复
怎么处理呢?
我认为应该在DragOver时触发Item Select
然后在DragDrop事件中再相应做些处理
但如何在DragOver时触发Item Select?
foolishtiger 2001-11-29
  • 打赏
  • 举报
回复
道理一样的,就是在DragDrop事件中再相应做些处理啦.
MonkeyLin 2001-11-29
  • 打赏
  • 举报
回复
注意这个:"替換一個其原有Image",^-^
foolishtiger 2001-11-29
  • 打赏
  • 举报
回复
怎么还是小猴啊??
foolishtiger 2001-11-29
  • 打赏
  • 举报
回复
http://www.csdn.net/expert/topic/382/382932.shtm

看看这贴吧.
uguess 2001-11-29
  • 打赏
  • 举报
回复

哇,上次不是已经解决了么?又出什么问题啦?


7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧