Unicode Controls & Classes for VB6 - Version 4

ctlUniTabbedXP Control

Tabbed panel with Unicode text
Check common properties here

Name Description
Name Type Description
BackColor (OLE_COLOR) Gets or sets the Background color of the control
BackColorSel (OLE_COLOR) Gets or sets the background color of the selected tabulator
BackColorTab (OLE_COLOR) Gets or sets the background color of a NON selected tabulator
BorderColor (OLE_COLOR) Gets or sets the Border color
ButtonStyle (eCtlButtonStyle) Gets or sets the style of buttons
Caption (String) Gets or sets the title of the specified tabulator
CurrentTab (Integer) Returns the index of the selected tabulator
Enabled (Boolean) Enables or disables the control
Font (Font) Gets or sets the font used for text in the control, check the [ApplyFontChanges] for details
ForeColor (OLE_COLOR) Gets or sets the text color
ForeColorSel (OLE_COLOR) Gets or sets the text color of the selected tabulator
ForeColorTab (OLE_COLOR) Gets or sets the text color of a NON selected tabulator
MouseIcon (Picture) Gets or sets the MouseIcon for the control
MousePointer (VBRUN.MousePointerConstants) Gets or sets the MousePointer for the control
OLEDropMode (eCtlOLEDropMode) Gets or sets the OleDropMode for the control
ShowFocus (Boolean) If True, draws the focus rectangle when the control gains the keyboard focus
Tip (String) Gets or sets the Unicode Tooltip for the control
Name Type Description
AddTab Adds a new tabulator with the given title
ApplyFontChanges When setting a new font on the control you need to call this function in order to refresh the interface
ChangeTab Activates the given tab
Clear Clears the control
GetTabByX (Integer) Retuns the tab at given coordinates
GetTabWidth (Long) Retuns the tab size in pixels
hWnd (Long) Retuns the handle associated with the control
OLEDrag Starts an OLEDrag operation
Tabs (Long) Returns the number of added tabulators
How to use the control:
This control represents only the clickable part of a tab control (it's not a container),
you need to use an array of frames (or ctlUniFrameWL) in order to contain your form data.
Add tabs using the [AddTab] method then simply catch the [TabChanged] event and show/hide frames.

- Create an array of frames, starting from index 0 to n-1
- If ctlUniFrameWL, set VistaStyle=True, remove captions and align them
- Draw the ctlUniTabbedXP on top of them and use this function to show the proper TAB

'Show a certain frame and hide others
Private Sub ShowTab(n As Integer)
Dim i As Integer
For i = 0 To MyFrame.Count - 1
MyFrame(i).Visible = False
If i = n Then MyFrame(i).Visible = True
End Sub

Private Sub ctlUniTabbedXP1_TabChanged(Index As Integer)
ShowTab Index - 1
End Sub
Private Sub Form_Load()
ShowTab 0
End Sub