473,387 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 1959
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: AV | last post by:
Hallo any idea why the following code doesn't work? ////////////////////////////////// function myfunc(){ with(this){ prop="hallo world"; } }
4
by: MJW | last post by:
Is there a way for me to know if or which command button was just clicked that triggers the LostFocus event for the current control on a Form? I have a form that has many types of users who each...
2
by: vooose | last post by:
Does anyone know the difference between these two? The doc for LostFocus says 'Occurs when the control loses focus.' whereas for Leave it says 'Occurs when the input focus leaves the control'...
0
by: Boni | last post by:
Dear all, If I have 2 windows, window 1 is active now select window 2. Is it guaranted that LostFocus of window 1 will happen earlier then gotfocus of window 2? I want to reach following:...
6
by: Carmon | last post by:
I am using Managed C++ with a CFormView and a MaskedTextBox and have used MAKE_DELEGATE to sink the LostFocus event of this control. I have other events I've sinked off this control and they all...
14
by: teddysnips | last post by:
WINDOWS FORMS I've a form that has a textbox that allows the user to enter a string. On the LostFocus event, the textbox formats the string into a preferred format. However, if the user...
3
by: Torilyn73 | last post by:
I posted this earlier... or thought I did... anyway.. it's doesn't appear in the list so I'm reposting it. Can someone please explain to me how to set up the lostfocus event for a combo box. I...
4
by: dbuchanan | last post by:
On the help page "TextBox Members" clearly there is an event for LostFocus. It is inherited from control. So without the event directly available for TextBox how do I use it? I know I could...
1
by: moondaddy | last post by:
I have a c# 3.5 wpf app which uses user controls for data entry screens. These data entry screens can be nested inside of each. We can also have several ones open side by side at the same time. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.