PrivateTabAreaAsRectangle
PrivateTabTextAreaAsRectangleF
Private SubForm1_Load (ByValSenderAsSystem. Object,ByValEAsSystem. EventArgs)Handles MyBase. Load
Me. TabControl1.DrawMode = TabDrawMode. OwnerDrawFixedSet the user drawing method
Me. TabControl1.Alignment = TabAlignment. RightSetTABRight-aligned Layout
TabControl1.SizeMode = TabSizeMode. Fixed'SettingsTABItem size (all same size)
TabControl1.ItemSize = New Size (150, 20)SET SIZE
End Sub
Private SubTabControl1_DrawItem (ByValSenderAs Object,ByValEAsSystem. Windows. Forms. DrawItemEventArgs)HandlesTabControl1.DrawItem
TabArea = TabControl1.GetTabRect (e. Index)It is mainly a conversion to obtainTABItemRECTANGELF
TabTextArea = RectangleF. op_Implicit (TabControl1.GetTabRect (e. Index ))
DimGAsGraphics = e. Graphics
DimSfAs NewStringFormat ()Encapsulate text layout information