losing mouse_hover and mouse_leave events

G

Guest

Hello,
I am having a problem using Form.ShowDialog in C# (2003).


I display a form with ShowDialog and then close it, then re-display with
ShowDialog again. Note that I am not re-instantiating the form, I don't
dispose after closing the form. The form shows correctly both times BUT, I
don't get any mouse_hover or mouse_leave events after the close and re-show.
This is causing some problems with some 3rd party components I use
(specifically ChartFX and Syncfusion). I have uses SPY and hooked into the
message loop and it is definitely not firing mouse_leave or mouse_hover after
the close and re-show.

Has anybody experienced this issue and/or have a workaround?
Thanks,
Dan
 
K

Kevin Yu [MSFT]

Hi Dan,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you hide and show dialog of a
form, some mouse events cannot be captured. If there is any
misunderstanding, please feel free to let me know.

Based on my research, this seems to be a known issue in current version of
.net framework. Button's Mouse Events do not get fired when the form is
showed by ShowDialog after the first time. It might also happen on some
other controls. This issue will be fixed in next version of .net framework.

Sorry for the inconvenience.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
K

Kevin Yu [MSFT]

Hi Dan,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
T

ToddT

does this also apply to label controls? i had the same thing happen (i
think) when capturing the mouse hover event over a label control (i
wanted to change the font of the label control to bold to make it
appear like a web link).
 

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