有没有办法在不触发 selectedIndexchanged 事件的情况下设置 tabControl 的选定选项卡?
例如这里选择 myTabPage2 时触发事件,因为 myTabPage1 是默认值:
Private Sub setupTabControl
If blnHasAccount=true then
MyTabControl.selectedTab=myTabPage1
else
MyTabControl.selectedTab=myTabPage2
End if
End sub
Private Sub MyTabControl_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyTabControl.SelectedIndexChanged
'Do stuff (but only when user has actually changed the tab themselves)
End Sub