I have a Panel that contains child controls.
If I handle the Panel\'s MouseEnter and MouseLeave events, and its c
The mouse is "leaving" the panel as it enters the child control which is why it fires the event.
You could add something along the following lines in the panel MouseLeave event handler:
// Check if really leaving the panel
if (Cursor.Position.X < Location.X ||
Cursor.Position.Y < Location.Y ||
Cursor.Position.X > Location.X + Width - 1 ||
Cursor.Position.Y > Location.Y + Height - 1)
{
// Do the panel mouse leave code
}