📄 form1.vb
字号:
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
'UserControl1 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
Friend WithEvents DirListBox1 As Microsoft.VisualBasic.Compatibility.VB6.DirListBox
Friend WithEvents DriveListBox1 As Microsoft.VisualBasic.Compatibility.VB6.DriveListBox
Friend WithEvents FileListBox1 As Microsoft.VisualBasic.Compatibility.VB6.FileListBox
'Required by the Windows Form Designer
Private components As System.ComponentModel.Container
'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.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.DirListBox1 = New Microsoft.VisualBasic.Compatibility.VB6.DirListBox
Me.DriveListBox1 = New Microsoft.VisualBasic.Compatibility.VB6.DriveListBox
Me.FileListBox1 = New Microsoft.VisualBasic.Compatibility.VB6.FileListBox
Me.SuspendLayout()
'
'DirListBox1
'
Me.DirListBox1.IntegralHeight = False
Me.DirListBox1.Location = New System.Drawing.Point(24, 43)
Me.DirListBox1.Name = "DirListBox1"
Me.DirListBox1.TabIndex = 0
'
'DriveListBox1
'
Me.DriveListBox1.DropDownWidth = 121
Me.DriveListBox1.Location = New System.Drawing.Point(24, 16)
Me.DriveListBox1.Name = "DriveListBox1"
Me.DriveListBox1.Size = New System.Drawing.Size(121, 22)
Me.DriveListBox1.TabIndex = 1
'
'FileListBox1
'
Me.FileListBox1.Location = New System.Drawing.Point(144, 16)
Me.FileListBox1.Name = "FileListBox1"
Me.FileListBox1.Pattern = "*.*"
Me.FileListBox1.Size = New System.Drawing.Size(128, 124)
Me.FileListBox1.TabIndex = 2
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(288, 157)
Me.Controls.Add(Me.FileListBox1)
Me.Controls.Add(Me.DriveListBox1)
Me.Controls.Add(Me.DirListBox1)
Me.Name = "Form1"
Me.Text = "文件浏览器"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub DriveListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DriveListBox1.SelectedIndexChanged
DirListBox1.Path = DriveListBox1.Drive
End Sub
Private Sub DirListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DirListBox1.SelectedIndexChanged
FileListBox1.Path = DirListBox1.Path
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -