Imports AxSftDirectoryLib25
Imports SftDirectoryLib25
Imports Softelvdm.OLEConvert
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Public WithEvents CheckShowHeaders As System.Windows.Forms.CheckBox
Public WithEvents CheckCheckBoxes As System.Windows.Forms.CheckBox
Public WithEvents CheckTreeLines As System.Windows.Forms.CheckBox
Public WithEvents Label8 As System.Windows.Forms.Label
Public WithEvents Label7 As System.Windows.Forms.Label
Public WithEvents Label6 As System.Windows.Forms.Label
Public WithEvents Label5 As System.Windows.Forms.Label
Public WithEvents Label4 As System.Windows.Forms.Label
Public WithEvents Label3 As System.Windows.Forms.Label
Public WithEvents Label2 As System.Windows.Forms.Label
Public WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents AxSftDirectoryDL_Combo As AxSftDirectoryLib25.AxSftDirectory
Friend WithEvents AxSftDirectoryTV_Combo As AxSftDirectoryLib25.AxSftDirectory
Friend WithEvents AxSftDirectoryDL As AxSftDirectoryLib25.AxSftDirectory
Friend WithEvents AxSftDirectoryTV As AxSftDirectoryLib25.AxSftDirectory
Friend WithEvents CloseButton As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
Me.AxSftDirectoryDL_Combo = New AxSftDirectoryLib25.AxSftDirectory
Me.AxSftDirectoryTV_Combo = New AxSftDirectoryLib25.AxSftDirectory
Me.AxSftDirectoryDL = New AxSftDirectoryLib25.AxSftDirectory
Me.AxSftDirectoryTV = New AxSftDirectoryLib25.AxSftDirectory
Me.CheckShowHeaders = New System.Windows.Forms.CheckBox
Me.CheckCheckBoxes = New System.Windows.Forms.CheckBox
Me.CheckTreeLines = New System.Windows.Forms.CheckBox
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.CloseButton = New System.Windows.Forms.Button
CType(Me.AxSftDirectoryDL_Combo, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.AxSftDirectoryTV_Combo, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.AxSftDirectoryDL, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.AxSftDirectoryTV, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'AxSftDirectoryDL_Combo
'
Me.AxSftDirectoryDL_Combo.Location = New System.Drawing.Point(320, 256)
Me.AxSftDirectoryDL_Combo.Name = "AxSftDirectoryDL_Combo"
Me.AxSftDirectoryDL_Combo.OcxState = CType(resources.GetObject("AxSftDirectoryDL_Combo.OcxState"), System.Windows.Forms.AxHost.State)
Me.AxSftDirectoryDL_Combo.Size = New System.Drawing.Size(240, 21)
Me.AxSftDirectoryDL_Combo.TabIndex = 3
'
'AxSftDirectoryTV_Combo
'
Me.AxSftDirectoryTV_Combo.Location = New System.Drawing.Point(320, 80)
Me.AxSftDirectoryTV_Combo.Name = "AxSftDirectoryTV_Combo"
Me.AxSftDirectoryTV_Combo.OcxState = CType(resources.GetObject("AxSftDirectoryTV_Combo.OcxState"), System.Windows.Forms.AxHost.State)
Me.AxSftDirectoryTV_Combo.Size = New System.Drawing.Size(240, 21)
Me.AxSftDirectoryTV_Combo.TabIndex = 2
'
'AxSftDirectoryDL
'
Me.AxSftDirectoryDL.Location = New System.Drawing.Point(8, 248)
Me.AxSftDirectoryDL.Name = "AxSftDirectoryDL"
Me.AxSftDirectoryDL.OcxState = CType(resources.GetObject("AxSftDirectoryDL.OcxState"), System.Windows.Forms.AxHost.State)
Me.AxSftDirectoryDL.Size = New System.Drawing.Size(272, 144)
Me.AxSftDirectoryDL.TabIndex = 1
'
'AxSftDirectoryTV
'
Me.AxSftDirectoryTV.Location = New System.Drawing.Point(8, 80)
Me.AxSftDirectoryTV.Name = "AxSftDirectoryTV"
Me.AxSftDirectoryTV.OcxState = CType(resources.GetObject("AxSftDirectoryTV.OcxState"), System.Windows.Forms.AxHost.State)
Me.AxSftDirectoryTV.Size = New System.Drawing.Size(272, 144)
Me.AxSftDirectoryTV.TabIndex = 0
'
'CheckShowHeaders
'
Me.CheckShowHeaders.BackColor = System.Drawing.SystemColors.Control
Me.CheckShowHeaders.Cursor = System.Windows.Forms.Cursors.Default
Me.CheckShowHeaders.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CheckShowHeaders.ForeColor = System.Drawing.SystemColors.ControlText
Me.CheckShowHeaders.Location = New System.Drawing.Point(9, 453)
Me.CheckShowHeaders.Name = "CheckShowHeaders"
Me.CheckShowHeaders.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.CheckShowHeaders.Size = New System.Drawing.Size(265, 17)
Me.CheckShowHeaders.TabIndex = 6
Me.CheckShowHeaders.Text = "Show headers (with sortable columns)"
'
'CheckCheckBoxes
'
Me.CheckCheckBoxes.BackColor = System.Drawing.SystemColors.Control
Me.CheckCheckBoxes.Cursor = System.Windows.Forms.Cursors.Default
Me.CheckCheckBoxes.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CheckCheckBoxes.ForeColor = System.Drawing.SystemColors.ControlText
Me.CheckCheckBoxes.Location = New System.Drawing.Point(9, 429)
Me.CheckCheckBoxes.Name = "CheckCheckBoxes"
Me.CheckCheckBoxes.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.CheckCheckBoxes.Size = New System.Drawing.Size(265, 17)
Me.CheckCheckBoxes.TabIndex = 5
Me.CheckCheckBoxes.Text = "Show check boxes"
'
'CheckTreeLines
'
Me.CheckTreeLines.BackColor = System.Drawing.SystemColors.Control
Me.CheckTreeLines.Cursor = System.Windows.Forms.Cursors.Default
Me.CheckTreeLines.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CheckTreeLines.ForeColor = System.Drawing.SystemColors.ControlText
Me.CheckTreeLines.Location = New System.Drawing.Point(9, 405)
Me.CheckTreeLines.Name = "CheckTreeLines"
Me.CheckTreeLines.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.CheckTreeLines.Size = New System.Drawing.Size(265, 17)
Me.CheckTreeLines.TabIndex = 4
Me.CheckTreeLines.Text = "Show tree lines for treeview style controls"
'
'Label8
'
Me.Label8.BackColor = System.Drawing.SystemColors.Control
Me.Label8.Cursor = System.Windows.Forms.Cursors.Default
Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label8.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label8.Location = New System.Drawing.Point(321, 288)
Me.Label8.Name = "Label8"
Me.Label8.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label8.Size = New System.Drawing.Size(233, 105)
Me.Label8.TabIndex = 40
Me.Label8.Text = "The combo boxes are also resizable when opened. Try resizing the control! If you" & _
" end and restart the sample, the height is preserved, because the RegistryLocati" & _
"on property is used."
'
'Label7
'
Me.Label7.BackColor = System.Drawing.SystemColors.Control
Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label7.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label7.Location = New System.Drawing.Point(321, 112)
Me.Label7.Name = "Label7"
Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label7.Size = New System.Drawing.Size(233, 105)
Me.Label7.TabIndex = 39
Me.Label7.Text = "All control styles support context menus too! Even the combo boxes. Of course yo" & _
"u can turn them off with the ShowContextMenu property."
'
'Label6
'
Me.Label6.BackColor = System.Drawing.SystemColors.Control
Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label6.Location = New System.Drawing.Point(8, 28)
Me.Label6.Name = "Label6"
Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label6.Size = New System.Drawing.Size(543, 30)
Me.Label6.TabIndex = 37
Me.Label6.Text = "SftDirectory supports these 4 basic control styles. Each can be further customiz" & _
"ed with multiple columns, headers, colors and many other attributes."
'
'Label5
'
Me.Label5.BackColor = System.Drawing.SystemColors.Control
Me.Label5.Cursor = System.Windows.Forms.Cursors.Default
Me.Label5.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label5.Location = New System.Drawing.Point(321, 229)
Me.Label5.Name = "Label5"
Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label5.Size = New System.Drawing.Size(169, 17)
Me.Label5.TabIndex = 34
Me.Label5.Text = "DetailList Combo Box"
'
'Label4
'
Me.Label4.BackColor = System.Drawing.SystemColors.Control
Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
Me.Label4.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label4.Location = New System.Drawing.Point(321, 61)
Me.Label4.Name = "Label4"
Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label4.Size = New System.Drawing.Size(169, 17)
Me.Label4.TabIndex = 33
Me.Label4.Text = "TreeView Combo Box"
'
'Label3
'
Me.Label3.BackColor = System.Drawing.SystemColors.Control
Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
Me.Label3.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label3.Location = New System.Drawing.Point(9, 229)
Me.Label3.Name = "Label3"
Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label3.Size = New System.Drawing.Size(169, 17)
Me.Label3.TabIndex = 32
Me.Label3.Text = "DetailList"
'
'Label2
'
Me.Label2.BackColor = System.Drawing.SystemColors.Control
Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
Me.Label2.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label2.Location = New System.Drawing.Point(9, 61)
Me.Label2.Name = "Label2"
Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label2.Size = New System.Drawing.Size(169, 17)
Me.Label2.TabIndex = 31
Me.Label2.Text = "TreeView"
'
'Label1
'
Me.Label1.BackColor = System.Drawing.SystemColors.Control
Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
Me.Label1.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label1.Location = New System.Drawing.Point(9, 5)
Me.Label1.Name = "Label1"
Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label1.Size = New System.Drawing.Size(161, 17)
Me.Label1.TabIndex = 30
Me.Label1.Text = "Control Styles"
'
'CloseButton
'
Me.CloseButton.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.CloseButton.Location = New System.Drawing.Point(560, 8)
Me.CloseButton.Name = "CloseButton"
Me.CloseButton.Size = New System.Drawing.Size(56, 24)
Me.CloseButton.TabIndex = 7
Me.CloseButton.Text = "Close"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(626, 480)
Me.Controls.Add(Me.CloseButton)
Me.Controls.Add(Me.AxSftDirectoryDL_Combo)
Me.Controls.Add(Me.AxSftDirectoryTV_Combo)
Me.Controls.Add(Me.AxSftDirectoryDL)
Me.Controls.Add(Me.AxSftDirectoryTV)
Me.Controls.Add(Me.CheckShowHeaders)
Me.Controls.Add(Me.CheckCheckBoxes)
Me.Controls.Add(Me.CheckTreeLines)
Me.Controls.Add(Me.Label8)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "Form1"
Me.Text = "ControlStyles Sample - Softel vdm, Inc."
CType(Me.AxSftDirectoryDL_Combo, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.AxSftDirectoryTV_Combo, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.AxSftDirectoryDL, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.AxSftDirectoryTV, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
'--locate-marker--
Private Sub CheckTreeLines_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckTreeLines.CheckedChanged
Dim style As SftDirectoryTreeLineStyleConstants
If CheckTreeLines.CheckState = CheckState.Checked Then
style = SftDirectoryTreeLineStyleConstants.treeLineStyleSftDirectoryDotted
Else
style = SftDirectoryTreeLineStyleConstants.treeLineStyleSftDirectoryNone
End If
AxSftDirectoryTV.TreeLineStyle = style
AxSftDirectoryDL.TreeLineStyle = style
AxSftDirectoryTV_Combo.TreeLineStyle = style
AxSftDirectoryDL_Combo.TreeLineStyle = style
End Sub
Private Sub CheckCheckBoxes_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckCheckBoxes.CheckedChanged
Dim style As SftDirectoryCheckBoxDisplayConstants
If CheckCheckBoxes.CheckState = CheckState.Checked Then
style = SftDirectoryCheckBoxDisplayConstants.checkboxDisplaySftDirectoryAll
Else
style = SftDirectoryCheckBoxDisplayConstants.checkboxDisplaySftDirectoryNone
End If
AxSftDirectoryTV.ShowCheckBoxes = style
AxSftDirectoryDL.ShowCheckBoxes = style
AxSftDirectoryTV_Combo.ShowCheckBoxes = style
AxSftDirectoryDL_Combo.ShowCheckBoxes = style
End Sub
Private Sub CheckShowHeaders_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckShowHeaders.CheckedChanged
Dim style As SftDirectoryHeadersStyleConstants
If CheckShowHeaders.CheckState = CheckState.Checked Then
style = SftDirectoryHeadersStyleConstants.headersSftDirectoryButton
Else
style = SftDirectoryHeadersStyleConstants.headersSftDirectoryNone
End If
AxSftDirectoryTV.Headers.Style = style
AxSftDirectoryDL.Headers.Style = style
AxSftDirectoryTV_Combo.Headers.Style = style
AxSftDirectoryDL_Combo.Headers.Style = style
End Sub
Private Sub AxSftDirectoryTV_CheckBoxClicked(ByVal sender As Object, ByVal e As AxSftDirectoryLib25._ISftDirectoryEvents_CheckBoxClickedEvent) Handles AxSftDirectoryTV.CheckBoxClicked
If e.newValue <> SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryNo And _
e.newValue <> SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes Then
e.newValue = SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes
End If
AxSftDirectoryTV.CurrentFolder.SetSubFolderCheckBoxes(e.newValue, True)
AxSftDirectoryTV.CurrentFolder.CheckBox = e.newValue
AxSftDirectoryTV.RootFolder.EvaluateSubFolderCheckBoxes(True)
End Sub
Private Sub AxSftDirectoryTV_Combo_CheckBoxClicked(ByVal sender As Object, ByVal e As AxSftDirectoryLib25._ISftDirectoryEvents_CheckBoxClickedEvent) Handles AxSftDirectoryTV_Combo.CheckBoxClicked
If e.newValue <> SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryNo And _
e.newValue <> SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes Then
e.newValue = SftDirectoryCheckBoxValueConstants.checkboxSftDirectoryYes
End If
AxSftDirectoryTV_Combo.CurrentFolder.SetSubFolderCheckBoxes(e.newValue, True)
AxSftDirectoryTV_Combo.CurrentFolder.CheckBox = e.newValue
AxSftDirectoryTV_Combo.RootFolder.EvaluateSubFolderCheckBoxes(True)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CheckTreeLines.CheckState = CheckState.Checked
End Sub
Private Sub CloseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseButton.Click
Application.Exit()
End Sub
End Class