471,605 Members | 1,327 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

LostFocus doesn't appear on EventsList ( Prop. window )

Hi
I need to use catch an event LostFocus, but its not visible in Evens
list in Properties Window of Form1.
Should i do it manually?
How then?
Tnanks
PK

Dec 5 '05 #1
2 1894
Hello,

The VB6 LostFocus event in C# is called "Leave". (The GotFocus event is
called "Enter").

HTH,
PAGates

"Piotrekk" wrote:
Hi
I need to use catch an event LostFocus, but its not visible in Evens
list in Properties Window of Form1.
Should i do it manually?
How then?
Tnanks
PK

Dec 5 '05 #2
Piotrekk,

LostFocus and GotFocus are not meant to be used in a normal windows form
application. As MSDN says they are low level events. You should use Enter
and Leave events. Enter and leave events are fired withe respect to the
windows form validation mechanism (event though the latter didn't work quite
well in .NET 1.x).

This was regarding the child controls, forms on the other hand suppress
firing these events, thus they are not listed in the property browser. Forms
fire Activate and Deactivate events instead. This is because forms are top
level windows and as such *activation/deactivation* (which is different than
focusing and losing focus) are the state that they undergo during the
application lifetime.

So look for Activate and Deactivate events when it comes to forms.
--
HTH
Stoitcho Goutsev (100) [C# MVP]
"Piotrekk" <Pi*************@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Hi
I need to use catch an event LostFocus, but its not visible in Evens
list in Properties Window of Form1.
Should i do it manually?
How then?
Tnanks
PK

Dec 6 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by AV | last post: by
2 posts views Thread by vooose | last post: by
reply views Thread by Boni | last post: by
3 posts views Thread by Torilyn73 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.