VB .NET Panels, Controls and Mouseover Events - Advice welcome

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sgeklor
    New Member
    • Oct 2007
    • 5

    VB .NET Panels, Controls and Mouseover Events - Advice welcome

    Dear All,

    My question refers to how best to organise my mouse events to correctly and efficiently give the effect I want.

    On my form I have a panel and that panel contains a number of controls.

    By setting up the MouseOver and MouseOut events for the panel I am able to change the panel's background while the mouse is over the panel. A very simple effect and one that is straightforward to implement.

    But, when the mouse cursor goes over one of the controls on the panel the panel event MouseOut fires and the effect is ruined, even though visually the mouse is still within the panel border.

    What do you think the correct way to fix this is? I can setup MouseOver and MouseOut events for all the controls on the panel and have them all fire the same function to change the panel's background colour, but I am worried about the panel flickering as the cursor moves from the panel to one of the controls.

    Or is there some elegant way to redefine the bounds used to control the panel's events?

    I am doing all of this in code as the panel and controls need to be generated at runtime, but that extra complication is something I can handle. I just want some advice on the best way to proceed.

    Thanks everyone,

    Ash
  • sgeklor
    New Member
    • Oct 2007
    • 5

    #2
    I haven't heard from anyone in regards to my query.

    Can anyone help?

    Comment

    Working...