I am developing an application in C# Windows Forms, and I would like to create an event handler/event handlers based on whether or not a particular tab page of a tab control is selected. So for example, if I have three tab pages:
tabPage1,
tabPage2,
tabPage3,
which belong to
tabControl1,
I need the code to either:
- Have three separate event handlers for each tab page
- Have one event handler and inside of the event handler there is code which can determine the tab page that is currently selected (e.g. a case statement of some sort)
I have looked at several examples thus far, but none seem to do what I need. How can I create this event/ these events?