Hello all, im new to .NET C# programming.
Im experimenting with tabcontrol now.
I created a tabcontrol with two tabs. I want to be able to do some stuff after i change tabs.I want to capture that i clicked on tabpage2 and execute some code and then show tabpage2. How do i go about doing that? I've tried by putting this code in my Form1.cs. But when run the application and switch tabs, nothing happens.
private void TabControl1_SelectedIndexChanged(Object sender, EventArgs e)
{
MessageBox.Show("You are in the TabControl.SelectedIndexChanged event.");
}
Any help would be great!.
Thanks
Laura
Im experimenting with tabcontrol now.
I created a tabcontrol with two tabs. I want to be able to do some stuff after i change tabs.I want to capture that i clicked on tabpage2 and execute some code and then show tabpage2. How do i go about doing that? I've tried by putting this code in my Form1.cs. But when run the application and switch tabs, nothing happens.
private void TabControl1_SelectedIndexChanged(Object sender, EventArgs e)
{
MessageBox.Show("You are in the TabControl.SelectedIndexChanged event.");
}
Any help would be great!.
Thanks
Laura
Last edited: