Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTabs
' Place close buttons in all the tabs of the tab control.
Me.UltraTabbedMdiManager1.TabGroupSettings.CloseButtonLocation = TabCloseButtonLocation.Tab
' Disable the close button in the first tab.
' This will also prevent middle clicking on the tab from closing it.
Me.UltraTabbedMdiManager1.TabGroups(0).Tabs(0).Settings.AllowClose = Infragistics.Win.DefaultableBoolean.False
' The second tab's close button should come before the image and text of the tab.
Me.UltraTabbedMdiManager1.TabGroups(0).Tabs(1).Settings.CloseButtonAlignment = TabCloseButtonAlignment.BeforeContent
' The third tab should only display a close button when it is the selected tab.
Me.UltraTabbedMdiManager1.TabGroups(0).Tabs(2).Settings.CloseButtonVisibility = TabCloseButtonVisibility.WhenSelected