473,804 Members | 3,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1983
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.goo glegroups.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
1597
by: AV | last post by:
Hallo any idea why the following code doesn't work? ////////////////////////////////// function myfunc(){ with(this){ prop="hallo world"; } }
4
8953
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 have their own set of fields they can change. Therefore I use setfocus property in the lostfocus event for some of the users to get from one control to another. Since I am "directing traffic" with setfocus, the users are unable to use the...
2
21275
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' The doc also states that for controls losing focus you should use Leave, so I do. Another reason I used it is because comboBox.LostFocus event
0
1030
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: ActiveWindow as XXXWindow a)in LostFocus of windows 1 ActiveWindow=nothing b)in GotFocus of windows 2 ActiveWindow=Window 2
6
3785
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 work fine, however, the LostFocus does not fire. I found Scribble online and they do the same thing I did, however, when I used this code in Visual Studio 2005 the LostFocus event didn't get fired either.
14
14639
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 presses the "Save" button while the textbox has the focus, the LostFocus code doesn't run at the right time, so that the "Save" function is dealing with an incorrectly formatted string and the whole caboodle goes splat.
3
2635
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 need the combo to return to its default value when the user clicks away from it ... either somewhere on the form itself or another app. I have no clue how to do this and would really appreciate some help. Thanks!
4
2315
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 create the event in code, but isn't there a more direct way?
1
13883
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. All are in a single window. My challenge is to know when a data entry screen (UC) becomes the active control, and when the active user control looses focus and when the next one gets the focus, and so on. When a user control gets or looses...
0
9584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9160
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2995
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.