Just curious, but I was looking to do some simple manipulations of variables based on what tab was selected.
But I dont see Deselected, Or Selecting as in this example, does 2005 use somthing different?
vb Code:
Private Sub TabControl1_Deselecting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TabControlCancelEventArgs) Handles TabControl1.Deselecting someClassLevelVariable = e.TabPageIndex End Sub
vb Code:
Private Sub TabControl1_Selecting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TabControlCancelEventArgs) Handles TabControl1.Selecting If (e.TabPageIndex = 1) Then e.Cancel = True End If End Sub




Reply With Quote