472,958 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Finding which control triggers the Lost focus

I have a situation wherein i have a text box, that has abc()[a validation
method that leaves the focus on the same control if not validated] being
executed whenever the lost focus event is triggered. However, there is an
exceptional case where, if a button click causes the lost focus, I do not
want abc() to be called. Is there a method by which one can find out which
control is triggering the lost focus event?

I have a keyboard shortcut for the click handle, and the lost focus handle
does not get invoked if I use the shortcut. However, when I try the mouse to
click on the button, the lost focus is gettin triggered.

Any thoughts?

Dec 13 '05 #1
0 1663

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

Similar topics

by: Carlos Lozano | last post by:
Hello everybody, I Have a piece of code for a Pocket PC that has a disabled and hidden textbox control at startup. It is enabled and set visible programatically. The cursor is captured calling...
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'...
by: Sameh Ahmed | last post by:
Hello there Is there a way to get the last control that was in focus before the current control? please note that I don't want the next or previous control in the tab order, I need the last one...
by: LCAdeveloper | last post by:
Another newbie question I'm afraid. When I use the .Focus() or .Select() methods to set the initial control that has focus on a form, try as I might I cannot get the control to visually indicate...
by: avinashraj | last post by:
Hello, I work with a third party control that provides the ability to load within it Winforms controls and providing a multi document interface such as the one in the VS.Net IDE. I find that...
by: =?Utf-8?B?amFtZXNAbm9zcGFtLmNvbQ==?= | last post by:
When processing the OnGotFocus event, I need to know the window/control that lost the focus. Is there a way to determint this? With MFC, you could use OnSetFocus which passed you the window that...
by: =?Utf-8?B?RWl0YW4=?= | last post by:
Hello, I have a WinForm application. The form has one Tab Control and one ToolStrip. I would like to know what would be the best way to detect when the user is "leaving" the Tab Control and...
by: Simon | last post by:
Dear reader, On the event "Lost focus" I make the ComboBox invisible but the massage pops up "You can't hide a control that has the focus." But this code is written in the "Lost focus"...
by: AdamOnAccess | last post by:
Hi, I'm trying to find an event in the web browser control that triggers when the user clicks on a link inside the control and arrives at a new page. My web browser control only shows 5 events...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.