Hi
i have a sight problem with detecting the mouse up in a drag-drop outside a form
what i have on my hands is an mdi form with 2 child forms: form1 and form2, both containing a label each. i also have a separate class (global vars) contining static members to pass data between forms.:
MDI parent:
. form1
. form2
. globalvars
form1:
. label
form2:
. label
globalvars:
. passvalue
i want to drag form1.label to form2.label, and on doing so, the text should get copied
what i'm currently doing is this:
when i click on form1.label, i call its mousedown event, in which i set a globalvars.passvalue to the contents of form1.label
i also initiate DoDragDrop for the label., passing the label as the originator.
when i drop the control on to form2.label, it set;s form2.label.text to globalvars.passvalue
i'd like to know of a better way of doing this, maybe using the DragEventArgs for the DragDrop method for the target?
if not, then how do i catch the Mouseup, if it is anywhere but on form2.label, so as to clear globalvars.passvalue
thanks