title: How do I detect a change of tab page in TabControl prior to SelectedIndexChanged event?
body: <p>I currently determine what page of a tabcontrol was clicked on via the <code>SelectedIndexChanged</code> event.</p>
  
  <p>I would like to detect <em>before</em> the selected index actually changes, for validation purposes. For example, a user clicks a tab page other than the one they are viewing. A dialog is presented if form data is unsaved and asks if it's ok to proceed. If the user clicks no, the user should remain on the current tab.</p>
  
  <p>Currently I have to remember the previous tab page and switch back to it after an answer of 'no.'</p>
  
  <p>I considered MouseDown (and the assorted calculation logic), but I doubt that's the best way.</p>