vbAccelerator - Contents of code file: mfrmMain.frmVERSION 5.00
Object = "{74AB545E-1F51-4CA8-A61B-89925A0B8D2A}#1.6#0"; "vbalDTab.ocx"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.MDIForm mfrmMain
BackColor = &H8000000C&
Caption = "Pinnable Tab Tester"
ClientHeight = 7755
ClientLeft = 4560
ClientTop = 3810
ClientWidth = 10605
Icon = "mfrmMain.frx":0000
LinkTopic = "MDIForm1"
Begin ComctlLib.StatusBar sbrMain
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 26
Top = 7440
Width = 10605
_ExtentX = 18706
_ExtentY = 556
SimpleText = ""
_Version = 327682
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 1
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 18177
Text = "vbAccelerator Pinnable Tab Tester"
TextSave = "vbAccelerator Pinnable Tab Tester"
Key = ""
Object.Tag = ""
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.PictureBox Picture1
Align = 1 'Align Top
BorderStyle = 0 'None
Height = 375
Left = 0
ScaleHeight = 375
ScaleWidth = 10605
TabIndex = 25
Top = 0
Width = 10605
Begin VB.CheckBox chkTestEnabled
Caption = "Test E&nabled"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1500
TabIndex = 28
Top = 60
Width = 1995
End
Begin VB.CommandButton cmdTestFont
Caption = "Test Font"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 60
TabIndex = 27
Top = 0
Width = 1335
End
End
Begin vbalDTab.vbalDTabControl tabLeft
Align = 3 'Align Left
Height = 7065
Left = 0
TabIndex = 0
Top = 375
Width = 2670
_ExtentX = 4710
_ExtentY = 12462
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty SelectedFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Pinnable = -1 'True
Begin VB.PictureBox picTab
BorderStyle = 0 'None
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3795
Index = 1
Left = 900
ScaleHeight = 3795
ScaleWidth = 1695
TabIndex = 2
Top = 1980
Visible = 0 'False
Width = 1695
Begin VB.CommandButton Command1
Caption = "&Search"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 180
TabIndex = 6
Top = 2880
Width = 1035
End
Begin VB.ListBox List1
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1230
Left = 120
TabIndex = 5
Top = 1320
Width = 1515
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 180
TabIndex = 4
Text = "vbAccelerator.com"
Top = 660
Width = 1515
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 180
TabIndex = 3
Text = "Pinnable Tabs"
Top = 60
Width = 1455
End
End
Begin VB.PictureBox picTab
BorderStyle = 0 'None
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3135
Index = 0
Left = 300
ScaleHeight = 3135
ScaleWidth = 1695
TabIndex = 1
Top = 180
Visible = 0 'False
Width = 1695
Begin VB.ListBox lstResults
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
IntegralHeight = 0 'False
Left = 60
TabIndex = 23
Top = 2280
Width = 1455
End
Begin VB.ComboBox Combo3
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
ItemData = "mfrmMain.frx":1272
Left = 60
List = "mfrmMain.frx":1285
TabIndex = 9
Text = "Titles Only"
Top = 1500
Width = 1575
End
Begin VB.ComboBox Combo2
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
ItemData = "mfrmMain.frx":12CA
Left = 60
List = "mfrmMain.frx":12DD
TabIndex = 8
Text = "Platform SDK"
Top = 900
Width = 1575
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
ItemData = "mfrmMain.frx":1322
Left = 60
List = "mfrmMain.frx":1335
TabIndex = 7
Text = "Windows Hooks"
Top = 300
Width = 1575
End
Begin VB.Label lblInfo
Caption = "&Results:"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 3
Left = 60
TabIndex = 24
Top = 2040
Width = 1575
End
Begin VB.Label lblInfo
Caption = "&Options:"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 2
Left = 60
TabIndex = 22
Top = 1260
Width = 1575
End
Begin VB.Label lblInfo
Caption = "&Filter By:"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 1
Left = 60
TabIndex = 21
Top = 660
Width = 1575
End
Begin VB.Label lblInfo
Caption = "&Look For:"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 0
Left = 60
TabIndex = 20
Top = 60
Width = 1575
End
End
End
Begin vbalDTab.vbalDTabControl tabRight
Align = 4 'Align Right
Height = 7065
Left = 7935
TabIndex = 10
Top = 375
Width = 2670
_ExtentX = 4710
_ExtentY = 12462
AllowScroll = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty SelectedFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Pinnable = -1 'True
Begin VB.PictureBox picTab
BorderStyle = 0 'None
Height = 2775
Index = 3
Left = 360
ScaleHeight = 2775
ScaleWidth = 1695
TabIndex = 16
Top = 180
Visible = 0 'False
Width = 1695
Begin VB.ComboBox Combo6
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 60
TabIndex = 19
Text = "Pinnable Tabs"
Top = 240
Width = 1575
End
Begin VB.ComboBox Combo5
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 60
TabIndex = 18
Text = "vbAccelerator.com"
Top = 780
Width = 1575
End
Begin VB.ComboBox Combo4
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 60
TabIndex = 17
Text = "VB Code"
Top = 1320
Width = 1575
End
End
Begin VB.PictureBox picTab
BorderStyle = 0 'None
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 3795
Index = 2
Left = 840
ScaleHeight = 3795
ScaleWidth = 1695
TabIndex = 11
Top = 1980
Visible = 0 'False
Width = 1695
Begin VB.TextBox Text4
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 180
TabIndex = 15
Text = "Pinnable Tabs"
Top = 60
Width = 1455
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 180
TabIndex = 14
Text = "vbAccelerator.com"
Top = 660
Width = 1515
End
Begin VB.ListBox List2
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1230
Left = 120
TabIndex = 13
Top = 1320
Width = 1515
End
Begin VB.CommandButton Command2
Caption = "&Search"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 180
TabIndex = 12
Top = 2880
Width = 1035
End
End
End
Begin ComctlLib.ImageList ilsIcons
Left = 6480
Top = 6360
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 11
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":137A
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":1554
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":172E
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":1908
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":1AE2
Key = ""
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":1CBC
Key = ""
EndProperty
BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":1E96
Key = ""
EndProperty
BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":2070
Key = ""
EndProperty
BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":224A
Key = ""
EndProperty
BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":2424
Key = ""
EndProperty
BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "mfrmMain.frx":25FE
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu mnuFileTOP
Caption = "&File"
Begin VB.Menu mnuFile
Caption = "&New..."
Index = 0
Shortcut = ^N
End
Begin VB.Menu mnuFile
Caption = "-"
Index = 1
End
Begin VB.Menu mnuFile
Caption = "E&xit"
Index = 2
End
End
End
Attribute VB_Name = "mfrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private m_lID As Long
Private Sub newDocument()
m_lID = m_lID + 1
Dim fD As New frmDocument
fD.Caption = "Document " & m_lID
fD.Show
End Sub
Private Sub chkTestEnabled_Click()
tabLeft.Tabs.Item("EXPLORER").Enabled = Not
(tabLeft.Tabs.Item("EXPLORER").Enabled)
Dim ctlPanel As Control
Set ctlPanel = tabLeft.Tabs.Item("EXPLORER").Panel
enableChildControls ctlPanel, tabLeft.Tabs.Item("EXPLORER").Enabled
End Sub
Private Sub enableChildControls( _
ctlContainer As Control, _
state As Boolean _
)
Dim ctl As Control
For Each ctl In Me.Controls
On Error Resume Next
If (withinContainer(ctl, ctlContainer)) Then
ctl.Enabled = state
End If
Next
End Sub
Private Function withinContainer( _
ctl As Control, _
ctlContainer As Control _
)
On Error Resume Next
Dim ctlC As Control
Set ctlC = ctl.Container
Do
If (ctlC Is ctlContainer) Then
withinContainer = True
Exit Do
Else
Set ctlC = ctlC.Container
If (Err.Number <> 0) Then
Exit Do
End If
End If
Loop
End Function
Private Sub cmdTestFont_Click()
Dim sF As New StdFont
sF.Name = tabLeft.Font.Name
If (tabLeft.Font.Size < 18) Then
sF.Size = 18
tabLeft.Font = sF
sF.Bold = True
tabLeft.SelectedFont = sF
Else
tabLeft.Font.Size = 8
sF.Size = 8
tabLeft.Font = sF
sF.Bold = True
tabLeft.SelectedFont = sF
End If
End Sub
Private Sub MDIForm_Load()
tabLeft.Pinned = False
tabLeft.ImageList = ilsIcons
Dim tabX As cTab
Set tabX = tabLeft.Tabs.Add("EXPLORER", , "Solution Explorer", 0)
tabX.Panel = picTab(0)
tabX.ToolTipText = "Explore objects in your solution"
Set tabX = tabLeft.Tabs.Add("CLASSVIEW", , "Class View", 1)
Set tabX.Panel = picTab(1)
tabX.ToolTipText = "Manage Classes in your project"
tabX.Selected = True
tabRight.Pinned = False
tabRight.ImageList = ilsIcons
Set tabX = tabRight.Tabs.Add("EXPLORER", , "Contents", 0)
tabX.Panel = picTab(2)
Set tabX = tabRight.Tabs.Add("CLASSVIEW", , "Search", 1)
Set tabX.Panel = picTab(3)
newDocument
End Sub
Private Sub mnuFile_Click(Index As Integer)
Select Case Index
Case 0
newDocument
Case 2
Unload Me
End Select
End Sub
Private Sub picTab_Resize(Index As Integer)
On Error Resume Next ' may be too small
Select Case Index
Case 0
Combo1.Move 2 * Screen.TwipsPerPixelX, Combo1.Top, picTab(0).ScaleWidth -
4 * Screen.TwipsPerPixelX
Combo2.Move Combo1.Left, Combo2.Top, Combo1.Width
Combo3.Move Combo1.Left, Combo3.Top, Combo1.Width
lstResults.Move Combo1.Left, lstResults.Top, Combo1.Width,
picTab(0).ScaleHeight - lstResults.Top - 2 * Screen.TwipsPerPixelY
Dim i As Long
For i = 0 To 3
lblInfo(i).Move Combo1.Left, lblInfo(i).Top, Combo1.Width
Next i
Case 1
Text1.Move 2 * Screen.TwipsPerPixelX, Text1.Top, picTab(1).ScaleWidth - 4
* Screen.TwipsPerPixelX
Text2.Move Text1.Left, Text2.Top, Text1.Width
List1.Move Text1.Left, List1.Top, Text1.Width
Command1.Left = (picTab(1).ScaleWidth - Command1.Width) \ 2
Case 2
Text3.Move 2 * Screen.TwipsPerPixelX, Text3.Top, picTab(2).ScaleWidth - 4
* Screen.TwipsPerPixelX
Text4.Move Text3.Left, Text4.Top, Text3.Width
List2.Move Text3.Left, List2.Top, Text3.Width
Command2.Left = (picTab(2).ScaleWidth - Command2.Width) \ 2
Case 3
Combo4.Move 2 * Screen.TwipsPerPixelX, Combo4.Top, picTab(3).ScaleWidth -
4 * Screen.TwipsPerPixelX
Combo5.Move Combo4.Left, Combo5.Top, Combo4.Width
Combo6.Move Combo4.Left, Combo6.Top, Combo4.Width
End Select
End Sub
|
|