Friend Const CtrlMask As Byte = 8
' 'ListView ' Me.AllowDrop = True Me.Controls.Add(Me.MainPanel) Me.Controls.Add(Me.ToolPanel) Me.Name = "ListView" Me.ViewMenu.ResumeLayout(False) Me.ResumeLayout(False)
Private Sub ListView_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop Dim f As String() = CType(e.Data.GetData(DataFormats.FileDrop), String()) Select Case e.Effect Case DragDropEffects.Copy : RaiseEvent FilesDropped(f, True) Case DragDropEffects.Move : RaiseEvent FilesDropped(f, False) End Select End Sub Private Sub ListView_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter If (e.KeyState And CtrlMask) = CtrlMask Then e.Effect = DragDropEffects.Copy Else e.Effect = DragDropEffects.Move End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)