title: Drag and Drop one control to another control in winform
body: <p>am doing something very very simple. </p>
  
  <p>I have a listbox whose events are set like this :</p>
  
  <pre><code>    public Form1()
      {
          InitializeComponent();
          this.listBox1.AllowDrop = true;
          this.listBox1.DragEnter += new DragEventHandler(listBox1_DragEnter);
          this.listBox1.DragDrop += new DragEventHandler(listBox1_DragDrop);
      }
  
      void listBox1_DragDrop(object sender, DragEventArgs e)
      {
         //code to add labelText to Items of ListBox
      }
  
      void listBox1_DragEnter(object sender, DragEventArgs e)
      {
          //set DragDropEffects;
      }
  </code></pre>
  
  <p>now I have a label, code for which is as follows:</p>
  
  <pre><code>    private void label1_MouseDown(object sender, MouseEventArgs e)
      {
          DoDragDrop((sender as Label).Text, DragDropEffects.Copy);
          //this.label1.DoDragDrop((sender as Label).Text, DragDropEffects.Copy);
          //used one of them at a time.
  
      }
  </code></pre>
  
  <p>but nothing happens. listbox DragEnter event never fires up. in fact, drag never happens.
  whenever i try to drag label (text), not allowed windows cursor appears, instead of  '<code>DragDropEffects.Copy</code>'s cursor</p>
  
  <p>Drag and Drop doesn't take place..</p>
  
  <p>when I modify the listbox (and the associated code) to accept files to be dropped on it from any other window, that works perfectly.</p>
  
  <p>so..am unable to perform drag from a control kept on the form to another control kept on the same form.</p>
  
  <p>am I missing something? am running windows XP. </p>
  
  <p>I went through <a href="http://codebetter.com/petervanooijen/2007/07/07/basic-drag-and-drop-in-winforms/" rel="nofollow noreferrer">this</a> and through <a href="https://stackoverflow.com/questions/68598/how-do-i-drag-and-drop-files-into-a-c-sharp-application">this</a></p>
  
  <p>please help...</p>