By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,125 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,125 IT Pros & Developers. It's quick & easy.

OnValidating event.....

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.