title: Windows form with list views, dragging and dropping, need source list view
body: <p>Using VS 2008 I have a windows form with 2 ListViews (we will call them ListView1 and ListView2).  ListView1 is populated with FileNames from a directory.  When an item is dragged from ListView1 to ListView2 I have some code that is executed.  When I dragDrop from ListView2 to ListView1 some code executes.  What I want to do is NOT execute the code if you dragdrop from ListView2 onto itself</p>
  
  <p>Here is the dragDrop Method which is invoked after a drop:</p>
  
  <p><code>private void view_DragDrop(object dropTarget, DragEventArgs e)</code></p>
  
  <p>I have tried a few items such as below:</p>
  
  <p><code>ListView data = (ListView)e.Data.GetData("System.Windows.Forms.ListView")</code></p>
  
  <p>This returns null what I wanted to do with the above is see if data = dropTarget, do not execute.</p>