On Aug 19, 4:18*pm, "john ciriello" <j.cirie...@comcast.netwrote:
Hi, is there an easy way to detect when the mouse pointer enters a disabled
button? For example I have a button I can see but it is greyed out. When the
mouse moves over it I would like to be able to right click and have it
respond with a context menu. Any ideas? Thanks in advance.
I do not know why you wanted a disabled button to raise an event. A
disabled control can not raise any event by the design of the Winform
Programming it self.
How ever you can achieve the functionality that you are talking about
with a little tweak.
Place a group box aroung the button exactly of the same size so that
it does not appear to the user.
Now the ContextMenuStrip that was attached to the button can be
assinged as a Contextmenu for the groupbox.
As groupbox is enabled always, can sent what ever event you are
interested in, and still in the region of button, it appears like
button is sending the events. (I mean to say user experience would be
same).
Hope this trick is helpful.
-Cnu