Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15919

VS 2010 drag and drop

$
0
0
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
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

I believe the first two subs to be correct. The drop in the third sub is where I am lost.
Thank You
George

Viewing all articles
Browse latest Browse all 15919

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>