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

Question: OnLeave or OnMouseLeave

P: n/a
Hi, I have a child form - when the mouse is over the button on the
parent form, I show the child form. When the mouse cursor is moved
away from the button, I hide the child form.

My child form hiding code can override either OnMouseLeave or OnLeave,
and both work okay.

The online documentation for both events says "This is the preferred
technique for handling the event in a derived class."

Although my code works for both, I want to code it properly. Any
suggestions on which routine should I really be overriding and more
importantly why?
Thank you

Colin
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* co***********@lycos.co.uk (Colin McGuire) scripsit:
Hi, I have a child form - when the mouse is over the button on the
parent form, I show the child form. When the mouse cursor is moved
away from the button, I hide the child form.

My child form hiding code can override either OnMouseLeave or OnLeave,
and both work okay.

The online documentation for both events says "This is the preferred
technique for handling the event in a derived class."

Although my code works for both, I want to code it properly. Any
suggestions on which routine should I really be overriding and more
importantly why?


Are you sure you understood the difference between 'OnLeave' and
'OnMouseLeave'? Have a look in the documentation for these methods.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
Thanks again Herfried - got it now.
Colin
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ul**************@TK2MSFTNGP09.phx.gbl...
* co***********@lycos.co.uk (Colin McGuire) scripsit:
Hi, I have a child form - when the mouse is over the button on the
parent form, I show the child form. When the mouse cursor is moved
away from the button, I hide the child form.

My child form hiding code can override either OnMouseLeave or OnLeave,
and both work okay.

The online documentation for both events says "This is the preferred
technique for handling the event in a derived class."

Although my code works for both, I want to code it properly. Any
suggestions on which routine should I really be overriding and more
importantly why?


Are you sure you understood the difference between 'OnLeave' and
'OnMouseLeave'? Have a look in the documentation for these methods.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.