Link to home
Start Free TrialLog in
Avatar of Paybit
Paybit

asked on

How to handle mouse events (Enter & Leave) in an mdi?

Hi,

I have an form with a panel holding a treeview menu, a commandline and a list with the last 20 commands used, on the left hand side.  I use a splitter to resize the panel to allow the user to resize it at will. But i also need to make an autohide function. I adde a Tagpin (button) that resizes the whole panel to a minimum width. Now the panel has to slide open or close when the mouse enters or leaves it.
On a normal form I use the forms mouse enter and leave events to do so and it works like a charm. Now the same form has to be used as an MDI. So setting the mdicontainer = true should be the only thing I have to do However, the mouse events don't seem to happen anymore and the autohide no longer works.
How can I trigger the mouse events To allow my form and panel to work regardless of being an mdi or not?

We need this form ASAP as it is a main part of the framework we are building and without it all other projects based on the framework are on hold.

Regards,

Alain Boone
ASKER CERTIFIED SOLUTION
Avatar of Fenris_Lokisson
Fenris_Lokisson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Paybit
Paybit

ASKER

Thanks!!
I just had to change the gettype.tostring = "mdiclient" beacause the string returned = "System.Windows.forms.MdiClient" and it has to be exactly the same, including the upper and lower casing.