Calling ShowDialog on MouseDown event

  • Thread starter Thread starter fhunter
  • Start date Start date
F

fhunter

When detecting a mouseDown event in my application I
would like to display a dialog/form.
I can do this calling ShowDialog(), however this call
locks until the user click on ok or cancel in the dialog.
And it looks as if since I am calling ShowDialog() from
with in my OnMouseDown event the dialog never get a
OnMouseDown event and it never returns from ShowDialog().

If I call ShowDialog() from anywhere else in the code, it
works fine.

What would be the correct way to call a ShowDialog() when
an OnMouseDown event is detected?

Thank you
 
Never mind, looks like it works fine using the OnMouseUp
event instead of OnMouseDown. So that's fine. Wish I knew
why though.

Thank you
 
Back
Top