Hi to all,
i have an app that i allow a drag and drop operation of picture boxes on a
panel.
when i drop a picture box i do the following so my newly dropped picture box
will be able
to respond to these 2 events:
pbox.MouseDown += new MouseEventHandler(pbox_MouseDown);
pbox.DoubleClick += new EventHandler(pbox_DoubleClick);
But although the code in MouseDown event executes correctly, the
pbox_DoubleClick
is never called...
It seems that because MouseDown is executing first, it cannot "understand"
the double click
and thus it;s code never executes...
Has anyone experienced this and come up to a solution ?
Below is the code for MouseDown event,
thanks a lot for any help!
private void pbox_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e) {
PictureBox pbox = (PictureBox) sender;
DragDropEffects myEffect;
FormInvoked = true;
switch (e.Button) {
case MouseButtons.Left: {
myEffect = pbox.DoDragDrop((Bitmap)
pbox.Image,DragDropEffects.Copy);
SetDefaultBox(pbox.Name);
break;
etc etc etc...