Heads up on control.focus

  • Thread starter Thread starter mklapp
  • Start date Start date
M

mklapp

Hello,

This is not a problem I need help with.

I discovered that if a control (at least a combo box)
has focus and then that control's focus method is
invoked, then the Leave Event for the control is
raised, "presumably before the Enter Event).

It makes a difference to me. Maybe it does to you.

mklapp
 
Hi,

I tested it on my system, the leave event doesn't occur when I set focus to
it.
Are you using a messagebox or someting like this in the enter event?
If yes, you may replace it with the Debug.WriteLine() and try again.
If you still have this problem , please send me a small sample , I'll take
a look at it.
Thanks!


Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.
 
Hi,
Thanks for your reply,
Show a messagebox will switch the focus to the messagebox, it will fire the
OnLeave event.
Of course, Debug.WriteLine will not.
If you have anything unclear on this issue, please reply this thread ,
thanks!

Happy Holidays!

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top