Hello
I am trying to learn about drag and drop. I found a got to work dragging text from a textbox1 to a drop in a listbox1.
I am now trying to drag the backcolor of textbox1 and drop it in textbox2. Lost would be an understatement.
Here is the code
I believe the first two subs to be correct. The drop in the third sub is where I am lost.
Thank You
George
I am trying to learn about drag and drop. I found a got to work dragging text from a textbox1 to a drop in a listbox1.
I am now trying to drag the backcolor of textbox1 and drop it in textbox2. Lost would be an understatement.
Here is the code
Code:
Public Class Form1
Private Sub TextBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseDown
TextBox1.DoDragDrop(TextBox1.BackColor, DragDropEffects.Copy)
End Sub
Private Sub ListBox1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles ListBox1.DragEnter
e.Effect = DragDropEffects.Copy
End Sub
Private Sub textbox2_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles TextBox2.DragDrop
TextBox2
End Sub
End Class
Thank You
George