I'm trying to implement the DragDrop, but I can't seem to getting it to work. My code in the myEditor_dragdrop event. Allowdrop is enabled.
If e.Data.GetDataPresent(DataFormats.FileDrop) Then Dim dropFiles As String() = CType(e.Data.GetData(DataFormats.FileDrop), String()) ' check the extension of the file If Path.GetExtension(dropFiles(0)).ToLower = ".txt" Then lst_xsyn.Text = File.ReadAllText(dropFiles(0).ToString) ' enable the start tbar_btn_conv.Enabled = True End If End If
When I drag the file nothing happens. The code works in the pastedrop-event. Am I doing anything wrong here?