vbAccelerator - Contents of code file: frmSwitchboard.frmVERSION 5.00
Begin VB.Form frmSwitchboard
Caption = "vbAccelerator TreeView: Shell Examples"
ClientHeight = 2865
ClientLeft = 3930
ClientTop = 2265
ClientWidth = 4935
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmSwitchboard.frx":0000
LinkTopic = "Form1"
ScaleHeight = 2865
ScaleWidth = 4935
Begin VB.CommandButton cmdFilesAndDirectories
Caption = "&All Shell Elements"
Height = 615
Left = 1320
TabIndex = 2
Top = 2100
Width = 2055
End
Begin VB.CommandButton cmdDirectories
Caption = "File System &Directories"
Height = 615
Left = 1380
TabIndex = 0
Top = 600
Width = 1995
End
Begin VB.Label lblInfo
Caption = $"frmSwitchboard.frx":45A2
Height = 675
Index = 1
Left = 180
TabIndex = 3
Top = 1380
Width = 4575
End
Begin VB.Label lblInfo
Caption = "The Directories Demonstration shows how to populate
a TreeView with File System directories:"
Height = 435
Index = 0
Left = 240
TabIndex = 1
Top = 180
Width = 4575
End
End
Attribute VB_Name = "frmSwitchboard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Function GetForm(ByVal sName As String) As Form
Dim frm As Form
Dim retFrm As Form
For Each frm In Forms
If (frm.Name = sName) Then
Set retFrm = frm
Exit For
End If
Next
If (retFrm Is Nothing) Then
Select Case sName
Case "frmDirectories"
Set retFrm = frmDirectories
retFrm.Show , Me
Case "frmFilesAndDirectories"
Set retFrm = New frmFilesAndDirectories
retFrm.Show , Me
End Select
End If
Set GetForm = retFrm
End Function
Private Sub cmdDirectories_Click()
Dim f As frmDirectories
Set f = GetForm("frmDirectories")
f.ZOrder
End Sub
Private Sub cmdFilesAndDirectories_Click()
Dim f As frmFilesAndDirectories
Set f = GetForm("frmFilesAndDirectories")
f.ZOrder
End Sub
|
|