Mike,
That was the first thing I tried. For some reason that event fires after
the SelectedIndexChanged event for the TabControl. I am not sure how
Windows Forms routes events. Know a good source of information on Forms
event routing?
Handling the WM_NOTIFY message works as expected.
David
"Mike Shane" <mi********@msta.com> wrote in message
news:Om**************@TK2MSFTNGP09.phx.gbl...
You could use the MouseDown event to determine that the user has clicked
on the tab contol and then check to see what tab was clicked.
Mike Shane
MST Associates
"David Rose" <da***@silverswitch.net> wrote in message
news:uJ**************@TK2MSFTNGP09.phx.gbl... Nicholas,
Thanks. That works fine.
I was hoping that there would be an easier way, but I guess that for
some reason that event is not handled in .NET.
David
"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote in message news:OK**************@TK2MSFTNGP09.phx.gbl... David,
You should be able to hook into the windows procedure of the
parent of the tab control and catch that notification. You just have to
override the WndProc method on that container.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com
"David Rose" <da***@silverswitch.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> I would like to catch the tab change before it occurs. There is a
> SelectedIndexChanged event to catch the change after it occurs. How
do I > catch when the user clicks on a tab, but before the TabPage changes?
>
> Is there anything like the TCN_SELCHANGING notification?
>
> TIA
>
> David Rose
>
>
>