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" <mike.shane@msta.com> wrote in message
news:OmdaMubdDHA.2168@TK2MSFTNGP09.phx.gbl...[color=blue]
> You could use the MouseDown event to determine that the user has clicked[/color]
on[color=blue]
> the tab contol and then check to see what tab was clicked.
>
> Mike Shane
> MST Associates
>
>
>
> "David Rose" <david@silverswitch.net> wrote in message
> news:uJ6xb9AdDHA.2436@TK2MSFTNGP09.phx.gbl...[color=green]
> > Nicholas,
> >
> > Thanks. That works fine.
> >
> > I was hoping that there would be an easier way, but I guess that for[/color][/color]
some[color=blue][color=green]
> > reason that event is not handled in .NET.
> >
> > David
> >
> >
> > "Nicholas Paldino [.NET/C# MVP]" <nicholas.paldino@exisconsulting.com>[/color]
> wrote[color=green]
> > in message news:OK1y7Z8cDHA.2640@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > David,
> > >
> > > You should be able to hook into the windows procedure of the[/color][/color][/color]
parent[color=blue]
> of[color=green][color=darkred]
> > > the tab control and catch that notification. You just have to[/color][/color][/color]
override[color=blue][color=green]
> > the[color=darkred]
> > > WndProc method on that container.
> > >
> > > Hope this helps.
> > >
> > >
> > > --
> > > - Nicholas Paldino [.NET/C# MVP]
> > > -
nicholas.paldino@exisconsulting.com
> > >
> > > "David Rose" <david@silverswitch.net> wrote in message
> > > news:%23RMNIRzcDHA.2368@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[/color][/color]
> do[color=green]
> > I[color=darkred]
> > > > catch when the user clicks on a tab, but before the TabPage changes?
> > > >
> > > > Is there anything like the TCN_SELCHANGING notification?
> > > >
> > > > TIA
> > > >
> > > > David Rose
> > > >
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]