MouseDown and Click events

  • Thread starter Thread starter mick
  • Start date Start date
M

mick

I have a form with some buttons on it. When I press one of the
buttons it will launch some app. Now I also want to also be able to drag
any of these button to an area at the bottom of the form so that
the button will be removed from the form.

The problem is the button MouseDown event blocks the button.Click
event, so while I can drag the buttons I cant actually click them to launch
any apps.

Anyone any idea how I can implement this?


mick
 
I have a form with some buttons on it. When I press one of the
buttons it will launch some app. Now I also want to also be able to drag
any of these button to an area at the bottom of the form so that
the button will be removed from the form.

The problem is the button MouseDown event blocks the button.Click
event, so while I can drag the buttons I cant actually click them to launch
any apps.

Anyone any idea how I can implement this?


mick

I haven't tried this, but in the MouseUp event, if the movement was
zero, or nearly zero, then it should be a click. Couldn't you just call
the button's click event with Button.PerformClick()?
 
Back
Top