By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,075 Members | 798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,075 IT Pros & Developers. It's quick & easy.

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

sgeklor
P: 5
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
Oct 15 '07 #1
Share this Question
Share on Google+
1 Reply

sgeklor
P: 5
I haven't heard from anyone in regards to my query.

Can anyone help?
Oct 16 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.