Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Got_Focus, Lost_Focus Event
Message
 
 
To
07/08/2001 14:05:59
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00540838
Message ID:
00540989
Views:
22
Hi nichole!

I don't understand very well the situation of yours but i think i can help if you explain a little bit better.

the code you showed does not gives any errors at all, check the hole form code.

You can check:
* if there's some code on timers that execute the .setfocus method
* if there is a .setfocus on the form_load (this one gives an error when you load the form, because you cannot force the focus of an object while loading a form)
* if the control property .enabled is set to true (if set to false the control cannot have focus)

About the order of the events on a form i've read of it only in the msdn library.

When the form loads it gives the focus to the control that haves the lower value on the property .tabindex and check if it can get focus, if it doesn't then the form try to give focus to the next control in the .tabindex rank, when it find a control that can get focus then it gives the focus and raise the event got_focus.

If you give focus to another control (by clicking on it, or pressing the tab key) then the control raises the event validate, and then the event lost_focus.
Previous
Reply
Map
View

Click here to load this message in the networking platform