Note that there are some explanatory texts on larger screens.

plurals
  1. PODoDragDrop from standard Label not working
    text
    copied!<p>I can't figure out why attempting to drag text from a standard Label to Notepad (or any other control accepting text) doesn't work. I've looked at documentation and examples and I'm not seeing the problem. The cursor remains a circle with a line through it and if I register a FeedBack callback the event is always NONE. Creating a standard Windows Forms Application, dropping a Label control and registering MouseDown &amp; MouseMove events I have this code where I call label1.DoDragDrop (label1, DragDropEffects.All | DragDropEffects.Link). Any help would be appreciated.</p> <p>Here is my form code:</p> <pre><code>using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace DragDropLabel { public partial class Form1 : Form { Point m_ClickLocation; bool _bDragging = false; public Form1() { InitializeComponent(); } private void OnLabelMouseDown(object sender, MouseEventArgs e) { m_ClickLocation = e.Location; _bDragging = true; } private void OnLabelMouseMove(object sender, MouseEventArgs e) { if (_bDragging) { Point pt = e.Location; Size dragSize = SystemInformation.DragSize; if (Math.Abs(pt.X - m_ClickLocation.X) &gt; dragSize.Width / 2 || Math.Abs(pt.Y - m_ClickLocation.Y) &gt; dragSize.Height / 2) { DragDropEffects rc = label1.DoDragDrop(label1, DragDropEffects.All | DragDropEffects.Link); _bDragging = false; } } } } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload