MouseHover logic
-
Hi, I need to implement my own MouseHover event for a library I'm working on. What is the exact logic of the MouseHover event? I can't find this on MSDN... It seems like the MouseHover is fired only after the first N milliseconds that the mouse is idle in a control, and perhaps only if the control has focus. I expect I'd set a Timer when the MouseMove event is fired, and then invalidate the Timer if the MouseMove event was fired before N milliseconds had elapsed.
-
Hi, I need to implement my own MouseHover event for a library I'm working on. What is the exact logic of the MouseHover event? I can't find this on MSDN... It seems like the MouseHover is fired only after the first N milliseconds that the mouse is idle in a control, and perhaps only if the control has focus. I expect I'd set a Timer when the MouseMove event is fired, and then invalidate the Timer if the MouseMove event was fired before N milliseconds had elapsed.
Arun Bhalla wrote: I need to implement my own MouseHover event Why? It's built into WinForms. If you really need to roll your own, try TrackMouseEvent[^]. :)
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
Arun Bhalla wrote: I need to implement my own MouseHover event Why? It's built into WinForms. If you really need to roll your own, try TrackMouseEvent[^]. :)
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma GandhiI'm writing a library of lightweight control-like objects which paint themselves on controls, such as Panel. I need to mimic MouseHover for these control-like objects. If I use Panel's MouseHover event, I only get the hover event once, while the cursor is in Panel's bounds, even if it hovers over my different control-like objects, all within Panel. TrackMouseEvent seems like it may be the way to go, or at least I'll know where to dig for the default value. (Yet another setting missing from SystemInformation.) Thanks!
-
I'm writing a library of lightweight control-like objects which paint themselves on controls, such as Panel. I need to mimic MouseHover for these control-like objects. If I use Panel's MouseHover event, I only get the hover event once, while the cursor is in Panel's bounds, even if it hovers over my different control-like objects, all within Panel. TrackMouseEvent seems like it may be the way to go, or at least I'll know where to dig for the default value. (Yet another setting missing from SystemInformation.) Thanks!
Arun Bhalla wrote: I'm writing a library of lightweight control-like objects which paint themselves on controls, such as Panel. Hehe, my team is creating a library of lightweight controls, called Fluid UI Toolkit[^]
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
Arun Bhalla wrote: I'm writing a library of lightweight control-like objects which paint themselves on controls, such as Panel. Hehe, my team is creating a library of lightweight controls, called Fluid UI Toolkit[^]
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma GandhiCool! I look forward to seeing that near completion... as we all know, the Microsoft-provided WinForms library is not so hot. I guess my library is quite different from yours... mine is more like Visio shape objects rather than things like toolbars.
-
Cool! I look forward to seeing that near completion... as we all know, the Microsoft-provided WinForms library is not so hot. I guess my library is quite different from yours... mine is more like Visio shape objects rather than things like toolbars.
Arun Bhalla wrote: I guess my library is quite different from yours... mine is more like Visio shape objects rather than things like toolbars. I figured that. Actually, I plan to use mine for document drawing objects, as it will probably lend itself well to that.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
Arun Bhalla wrote: I guess my library is quite different from yours... mine is more like Visio shape objects rather than things like toolbars. I figured that. Actually, I plan to use mine for document drawing objects, as it will probably lend itself well to that.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma GandhiThe main reason (or rather, the straw that broke the camel's back) I wrote the library is that Control.Location, etc. didn't inherently support the location on a ScrollableControl relative to AutoScrollPos. Very annoying. There were other issues, though.
-
The main reason (or rather, the straw that broke the camel's back) I wrote the library is that Control.Location, etc. didn't inherently support the location on a ScrollableControl relative to AutoScrollPos. Very annoying. There were other issues, though.
-
.NET AutoScroll== X| . ;)
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma GandhiYeah, and I'm lazy. AutoScroll seems to mostly work, but in a tricky and incomplete way. Oh well!