Alright i have a code for getting the path of drop file to my label..
how to filter the file that i want to drop to my label?Code:Private Sub Label1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Label1.DragDrop If e.Data.GetDataPresent("FileDrop") Then Dim theFiles() As String = CType(e.Data.GetData("FileDrop", True), String()) For Each theFile As String In theFiles MsgBox(theFile) Next End If End Sub Private Sub Label1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Label1.DragEnter If e.Data.GetDataPresent(DataFormats.FileDrop) Then e.Effect = DragDropEffects.Copy Else e.Effect = DragDropEffects.None End If End Sub
for example i just want to filter it to "demo.exe" or "*.exe" how can i do this?
or is it possible to code this to drag enter?
huh.... i know this in vb6 but for vb.net..
please help me..im new to .net...![]()





Reply With Quote