Hey Dan, here is the code. I would just like to be able to say drag
something ( some text ) from WordPad and drop it in my compiled application
in the richtextbox control. With this code it will drag and drop but it will
replace the text already in the richtextbox with the dragged code. I would
like to append it or put it anywhere in the richtextbox.
Is this possible?
Private Sub RichTextBox1_DragEnter(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles RichTextBox1.DragEnter
If (e.Data.GetDataPresent(DataFormats.Text)) Then
e.Effect = DragDropEffects.Copy
Else
e.Effect = DragDropEffects.Move
End If
End Sub
Private Sub RichTextBox1_DragDrop(ByVal sender As Object, ByVal e As
System.Windows.Forms.DragEventArgs) Handles RichTextBox1.DragDrop
RichTextBox1.Text = e.Data.GetData(DataFormats.Text)
' RichTextBox1.Text = e.Data.GetData(DataFormats.Text).ToString
End Sub
TIA
Dave