title: C# - Winforms - Custom Drag Image is Not Displayed When Dragging by Touch
body: <p>I have an old WinForms app written in C# with custom drag and drop capabilities. And this app has an issue when it is run on a touch screen device, such as the Surface Pro 3. </p>
  
  <p>Basically there is a treeview control that allows the items to be dragged to a different area of the app and have some calculations done. If I use the mouse or the stylus the custom drag image is drawn on the screen. If I drag an item using touch the image is not displayed but the code is executed properly, including the drawing of a custom cursor.</p>
  
  <p>It seems that the custom drag image is not displayed because the mouse cursor is hidden by the O.S. during a touch drag operation. How do I get the drag image to display?</p>
  
  <p><strong>UPDATE</strong>
  Here is some code to demonstrate what I am trying to fix. Create a new WinForms app, add a treeview to it and wire up the events. You'll notice that if you use a stylus or the mouse the drag operation will show an icon. If you touch-drag an item, nothing shows.</p>
  
  <pre><code>public Form1()
      {
          InitializeComponent();
  
          TreeNode node = new TreeNode("welp");
  
          treeView1.Nodes.Add(node);
          treeView1.Nodes.Add(node);
          treeView1.Nodes.Add(node);
          treeView1.Nodes.Add(node);
          treeView1.Nodes.Add(node);
          treeView1.Nodes.Add(node);
          treeView1.Nodes.Add(node);
          treeView1.Nodes.Add(node);
          treeView1.Nodes.Add(node);
          treeView1.Nodes.Add(node);
      }
  
      private void treeView1_DragEnter(object sender, DragEventArgs e)
      {
          e.Effect = DragDropEffects.Move;
      }
  
      private void treeView1_GiveFeedback(object sender, GiveFeedbackEventArgs e)
      {
          e.UseDefaultCursors = true;
      }
  
      private void treeView1_ItemDrag(object sender, ItemDragEventArgs e)
      {
          ((TreeView)sender).DoDragDrop(e.Item, DragDropEffects.Move);
      }
  </code></pre>