|
-
Apr 3rd, 2003, 05:05 AM
#1
Thread Starter
Fanatic Member
Drag drop with listviews
hi
i am try out to handle drag drop with listviews....
i have folders and files loaded in listview
when item is drag and drop on other item say file is drop in folder
i need to move the file ...
i tried a bit but seems to have problem
Code:
Private Sub Lvw_Files_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Lvw_Files.DragDrop
Dim lv As ListViewItem
Dim lv_Denst As ListViewItem
Try
lv = CType(e.Data.GetData("System.Windows.Forms.ListViewItem"), ListViewItem)
Dim pt As Point
'pt = Lvw_Files.PointToClient(New Point(e.X, e.Y))
lv_Denst = Lvw_Files.GetItemAt(e.X, e.Y)
If Not (lv_Denst Is Nothing) Then
lv_Denst.Selected = True
MsgBox("source " & lv.Text.ToString & "-- dest " & lv_Denst.Text.ToString)
Else
MsgBox("not found")
End If
Catch ex As Exception
StatusBar1.Panels(0).Text = ex.Message
End Try
lv_Denst = Lvw_Files.GetItemAt(e.X, e.Y) does not return the item.....
-
Apr 5th, 2003, 12:25 AM
#2
Thread Starter
Fanatic Member
welll is it so hard..... is it not possible........
i tried out... but seem some problem
Code:
'in list view drag drop event
lv_Denst = CType(Lvw_Files.GetItemAt(e.X, e.Y), ListViewItem)
does'nt return any value...
-
Apr 7th, 2003, 08:01 AM
#3
Thread Starter
Fanatic Member
-
Apr 7th, 2003, 08:39 AM
#4
Sleep mode
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|