MouseDown and Click events

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
 
F

Family Tree Mike

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()?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top