日期:2012-01-29  浏览次数:20526 次

CustomTreeViewForm类,好东西大家分享,好好研究一下哦!
Public Class CustomTreeViewForm
    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
        InitializeForm()
    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.
    Friend WithEvents tvwCategories As System.Windows.Forms.TreeView
    Friend WithEvents txtSelectedID As System.Windows.Forms.TextBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.tvwCategories = New System.Windows.Forms.TreeView()
        Me.txtSelectedID = New System.Windows.Forms.TextBox()
        Me.SuspendLayout()
        '
        'tvwCategories
        '
        Me.tvwCategories.ImageIndex = -1
        Me.tvwCategories.Location = New System.Drawing.Point(7, 2)
        Me.tvwCategories.Name = "tvwCategories"
        Me.tvwCategories.SelectedImageIndex = -1
        Me.tvwCategories.Size = New System.Drawing.Size(277, 240)
        Me.tvwCategories.TabIndex = 0
        '
        'txtSelectedID
        '
        Me.txtSelectedID.Location = New System.Drawing.Point(6, 246)
        Me.txtSelectedID.Name = "txtSelectedID"
        Me.txtSelectedID.Size = New System.Drawing.Size(278, 20)
        Me.txtSelectedID.TabIndex = 1
        Me.txtSelectedID.Text = "txtSelectedID"
        '