title: How do I tell which tab you are moving from/to in a WinForms tab control?
body: <p>I need to determine which tab the user is coming from, and going to, when they switch tabs, and possibly cancel the switch.  I have tried the Deselecting, Deselected, Selecting, Selected events, and all of them show the e.TabPageIndex to be the same as the sender.SelectedIndex.</p>
  
  <p>Is there an event, or property, that I can use so that I can determine both sides of this, or do I have to hack something together with caching it from one event and using that value in the new event.</p>
  
  <p>I am trying to avoid handling the Deselecting/Deselected events and caching the value to use in the Selecting event.  I already know I can do this, so I am asking if there is a cleaner way, without doing this.</p>
  
  <p>I have tried in both C# and VB, with the same results (no surprise).</p>
  
  <p>Thanks.</p>