OnValidating event.....

  • Thread starter Thread starter Jim
  • Start date Start date
J

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
 
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?
 
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 said:
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]
- (e-mail address removed)

"Jim" <ssss> wrote in message news:[email protected]...
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
 
Back
Top