title: C# Detect Desktop Folder Mouse-Up during a Drag operation?
body: <p><em>&lt; I have reviewed the "related questions" shown by SO before posting this ></em></p>
  
  <p>Scenario :</p>
  
  <ol>
  <li><p>Drag and drop initiated from a control within a WinForm.</p>
  
  <p><em>note : all drag and drop code validated, carefully tested. I can use the code right now
  to create/write a file to the Desktop when the mouse is released.</em></p></li>
  <li><p>Drag goes outside the Form, mouse goes up over the Desktop or some "item" on the Desktop.</p></li>
  </ol>
  
  <p>[edit in response to comment by Groo]</p>
  
  <p>In this case the drop may go onto the desktop (where it will become a file : that case is already handled); or, the drop may go into a control of the same type (as the control from which the drag was initiated) in another application's running instance (that case is taken care of). The case that I am asking about is where the drop occurs on a desktop Folder : Groo's comments have made want to test trying to modify the DataObject type "on the fly" ... during the drag ... which I've never tried before : I have no idea if it's possible.</p>
  
  <p>[end edit ]</p>
  
  <p>I can use the api calls in this code sample [1*] to get an IntPtr ID for the mouse going up over the Desktop : the same IntPtr is returned for any Desktop item, like a Folder, a Shortcut, the Recycle Bin, etc.</p>
  
  <p>What I want is : to be able to detect when the mouse is released over a Folder on the Desktop : of course what I want to do then is to get the path of the folder the mouse went up over : so I can create the file within that folder.</p>
  
  <p>thanks, Bill</p>
  
  <p>[1*]</p>
  
  <p>"FindWindow By Jörg Bausch"</p>
  
  <p><a href="http://www.codeproject.com/KB/dialog/FindWindow.aspx?msg=3262771" rel="nofollow noreferrer">http://www.codeproject.com/KB/dialog/FindWindow.aspx?msg=3262771</a></p>