473,851 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

LostFocus events *never* fire

My app needs to use the LostFocus event on several different controls on a
form. Unfortunately, I got done coding it only to find out that none of
them ever fire. They are assigned to, and I'm sure I'm doing everything
right, but they're not working. Anyone else have this problem/know how to
fix it?

Chris LaJoie
Nov 15 '05 #1
2 2187
Try using the Leave event.

--
Michael Culley
"Chris LaJoie" <ch***@etriptra der.com> wrote in message news:O8******** ******@tk2msftn gp13.phx.gbl...
My app needs to use the LostFocus event on several different controls on a
form. Unfortunately, I got done coding it only to find out that none of
them ever fire. They are assigned to, and I'm sure I'm doing everything
right, but they're not working. Anyone else have this problem/know how to
fix it?

Chris LaJoie

Nov 15 '05 #2
That works. Still don't understand why LostFocus doesn't though. Thanks.

Chris LaJoie

"Michael Culley" <mc*****@NOSPAM optushome.com.a u> wrote in message
news:eC******** *****@TK2MSFTNG P10.phx.gbl...
Try using the Leave event.

--
Michael Culley
"Chris LaJoie" <ch***@etriptra der.com> wrote in message

news:O8******** ******@tk2msftn gp13.phx.gbl...
My app needs to use the LostFocus event on several different controls on a form. Unfortunately, I got done coding it only to find out that none of
them ever fire. They are assigned to, and I'm sure I'm doing everything
right, but they're not working. Anyone else have this problem/know how to fix it?

Chris LaJoie


Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9434
by: Randi | last post by:
Hi All, I have a problem on a username password login form. I use: txtPassword.Text = StrConv(txtPassword.Text, vbProperCase) to validate the proper case when someone enters their name and password. It work when you use the button to continue, but if you hit enter on your keyboard the event apparently doesnt lose focus and it says you entered the wrong password. Is there an easy fix for this. I pointed out the problem code below. Any...
4
10461
by: dudzcom | last post by:
hi, this is the first time i've posted to this board, though i have been a devoted lurker for some time i have been working in vb.net and run into a couple problems that seem to require solutions involving what was in previous versions of vb, refered to as gotfocus/lostfocus events. however, it seems that though people online refer to them, my vb.net does not have them just to show i've not lost my mind...
2
3186
by: Paul | last post by:
I have a datagrid tied to a data adapter. Everything works great, EXCEPT, the LostFocus event only fires when I click on a specific cell within the DataGrid. If I set focus on another control, the LostFocus event does not fire. This is causing problems because I am checking for HasChanged on every CurrentCellChanged event. So if I change a cell, move to a new row, the update occurs just fine. However, if I change a cell, then set the...
0
1293
by: Scott McChesney | last post by:
All - I am in the process of developing a custom control that mimics the Office 2003 "Inbox" as closely as possible. After a great deal of frustrating work trying to do a heavily custom-drawn ListView (which is how I believe MS is doing it) and getting nowhere, I said "screw it" and built the thing from scratch. I have a UserControl with a few contained controls, a header control I'm drawing entirely by hand, and a Panel in which I'm...
2
1986
by: Piotrekk | last post by:
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
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
14649
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.
0
2365
by: kirk | last post by:
I started with a System.Windows.Forms.Form and subscribed to its LostFocus event. The event fires perfect. I added a System.Windows.Forms.LinkLabel to the aforementioned Form and tested the same LostFocus event again. It does not fire any longer. If I remove the LinkLabel, LostFocus fires again. Why does this fail and how can I get LostFocus to fire for the container Form with a LinkLabel present?
1
13895
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
9898
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9748
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,...
0
11020
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10670
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10356
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...
1
7907
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
5736
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4143
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3180
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.