Well, frankly, there is an easier way by which you initialize a global boolean variable called what you like, in this case isMouseClicked . At your control you want to enable drag and drop, you go to the mouse event,
Make sure this event is your audit event, not a form event.
if (e.button == MouseButtons.left) //this is where you set the boolean to true
Then go to the mouse move event
if (isMouseClicked == true)
Hover over isMouseClicked to false ;
Epicjoker
source share