473,396 Members | 1,832 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,396 software developers and data experts.

OnValidating event.....

Jim
Is it possible to determine where the focus is going in or before the
OnValidating event has been processed?

I know you can ge the window recieveing focus in the LostFocus event
(WM_KILLFOCUS) but that is to late for what I want, the only other way I can
imagine doing it is using a window hook to the win32 message queue as
insepcting the messages in the queue.

Cheers

Jim
Nov 15 '05 #1
2 2677
Jim,

How much earlier do you want it? If you can get the next window
receiving the focus in the LostFocus event, then I don't see how you can
possibly get it earlier.

What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jim" <ssss> wrote in message news:ex**************@TK2MSFTNGP09.phx.gbl...
Is it possible to determine where the focus is going in or before the
OnValidating event has been processed?

I know you can ge the window recieveing focus in the LostFocus event
(WM_KILLFOCUS) but that is to late for what I want, the only other way I can imagine doing it is using a window hook to the win32 message queue as
insepcting the messages in the queue.

Cheers

Jim

Nov 15 '05 #2
Jim
The reason being is the business logic can cause validation (OnValidating)
to fail depending on which control the focus is set to?

Hence needing to know where focus is going before LostFocus event.

I know this seems bizare and stange but this is a code port from C\C++ app
into C# and I'm 'trying' (being the operative word) not to using Win32 API
or programming paradigm.

Cheers

Ollie

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:Ot*************@TK2MSFTNGP11.phx.gbl...
Jim,

How much earlier do you want it? If you can get the next window
receiving the focus in the LostFocus event, then I don't see how you can
possibly get it earlier.

What are you trying to do?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jim" <ssss> wrote in message

news:ex**************@TK2MSFTNGP09.phx.gbl...
Is it possible to determine where the focus is going in or before the
OnValidating event has been processed?

I know you can ge the window recieveing focus in the LostFocus event
(WM_KILLFOCUS) but that is to late for what I want, the only other way I

can
imagine doing it is using a window hook to the win32 message queue as
insepcting the messages in the queue.

Cheers

Jim


Nov 15 '05 #3

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

Similar topics

1
by: BuddyWork | last post by:
Hello, How can I trigger the OnValidating event for a TextBox from another Form? Say Form1 has TextBox, Form1 is loaded modaless and Form2 is loaded Modaless but I want to run the TextBox...
0
by: BuddyWork | last post by:
Hello, Here is the problem, My code exists out of the TextBox.OnValidating event cleanly because the user has click on a menu that allows the user to load another screen, when that screen is...
0
by: BuddyWork | last post by:
Hello, Here is the problem, My code exists out of the TextBox.OnValidating event cleanly because the user has click on a menu that allows the user to load another screen, when that screen is...
2
by: Vern | last post by:
I have a custom control which has it's own OnValidating event handler. I would like to skip the validations if the Cancel/Exit button is pressed. Also, if possible, would like to skip the...
0
by: Vern | last post by:
I have a custom control which has it's own OnValidating event handler. I would like to skip the validations if the Cancel/Exit button is pressed. Also, if possible, would like to skip the...
1
by: Vern | last post by:
I know that I can get it to run but setting the focus to that control, and then to another control that causes validation, but I'm wondering if I can trigger that event for a control without using...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
9
by: jeff | last post by:
New VB user...developer... Situation...simplified... - I want to wrap a pre and post event around a system generated where the pre-event will always execute before the system event and the...
0
by: Philipp | last post by:
Hi, I made my own DataGridViewEditingControl, DataGridViewCell and DataGridViewColumn. Is it possible to use an Onvalidating event in an editing control in a datagridview? I wrote something...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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,...
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
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...
0
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...

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.