Declare Function GetTabbedTextExtent Lib "User32.dll" Alias "GetTabbedTextExtentA" (ByVal hdc As Long, ByVal lpsz As String, ByVal cchString As Long, ByVal nTabPos As Long, ByVal lpnTabStopPos As Long) As Long
Dim SupressRefresh As Boolean
Dim page As PropertySheetMaster.Page
Dim sheet As PropertySheetMaster.Sheet
Dim currenttab As Integer
Dim TabFont As New Font
' METHODS for object: PropertySheetMaster.Ptab
Sub Click()
' If my tab is already forward, do nothing
If currenttab = -1 Then Exit Sub
' Tell other tabs to turn themselves off
Parent.TabGroup.ToggleStatus(Me)
Parent.UpdateDisplay(Me)
End Sub
Sub ConnectToPage (pp as PropertySheetMaster.Page, ps As PropertySheetMaster.Sheet)
' connect the tab to its sheet
sheet = ps
' connect the tab to the page
page = pp
' Append us to the end of the group of tabs
page.TabGroup.Append(Me)
' Set the name of the tab caption
Caption = ps.Caption
End Sub
Sub Destruct()
Parent.TabGroup.RemoveObject(Me)
' If the tab has a sheet, remove the sheet's tab reference and
' destroy the sheet.
If sheet <> Nothing Then
sheet.ptab = Nothing
DestroyObject(sheet)
End If
' If we're embeded in a page, reset it's current tab