Order Of Events not Consistent

E

Elmer Miller

I have found that the order of events when leaving a control are not
consistent but vary depending on whether you use Tab or the mouse to leave
the control. This behavior is documented (see link below) so it appears to
be by design, but I can't figure out why this should be the case. In one
case validating occurs before lostfocus, and in the other case lostfocus
occurs before validating. This is causing problems for me. Could someone
please explain the reasoning behind this inconsistency?
Thanks.

http://msdn.microsoft.com/library/d...emwindowsformscontrolclassvalidatingtopic.asp
 
M

Mike Hildner

Not an answer, just a note. I've had nasty "bugs" show up when the coder is
a mouser and the user is a keyboarder. Or vice versa. Difficult to
reproduce. I'd like to know the "rules" for taking care of both.

Mike
 
G

Guest

I also do not have an answer behind the reasoning, but I do know how to make things a little more consistent in your specific example

The .NET Framework documentation states that you should not use "LostFocus" if possible
 

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

Top