Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TabsTabGrid.SelectedObject = TabsTab UpdateButtons() End Sub Private Sub UpdateButtons() prevButton.Enabled = (MainTabControl.Current > 0) nextButton.Enabled = (MainTabControl.Current < MainTabControl.Count - 1) End Sub Private Sub nextButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nextButton.Click MainTabControl.Current = MainTabControl.Current + 1 End Sub Private Sub prevButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles prevButton.Click MainTabControl.Current = MainTabControl.Current - 1 End Sub Private Sub closeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles closeButton.Click Application.Exit() End Sub Private Sub MainTabControl_Switched(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainTabControl.Switched UpdateButtons() End Sub Private Sub TabsTab_Switched(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabsTab.Switched If TabsTab.Current >= 0 Then EditButton.Enabled = True Else EditButton.Enabled = False End If End Sub Private Sub timerWorld_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerWorld.Tick sftTabsWorld.TabCollection(0).ImageList = imageListWorld Dim index As Integer = sftTabsWorld.TabCollection(0).ImageIndex index = index + 1 If index >= 16 Then index = 0 sftTabsWorld.TabCollection(0).ImageIndex = index End Sub Private Sub helpButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles helpButton.Click Help.ShowHelp(Me, "ms-help://SftTabsNET60/SftTabsNET60/g_usingVS.html", HelpNavigator.TableOfContents) End Sub Private Sub EditButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditButton.Click TabsTab.TabCollection(TabsTab.Current).Edit() End Sub End Class