exer43.frm
来自「VB6.0应用例题」· FRM 代码 · 共 113 行
FRM
113 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.DriveListBox Drive1
Height = 300
Left = 360
TabIndex = 2
Top = 600
Width = 1815
End
Begin VB.DirListBox Dir1
Height = 1140
Left = 360
TabIndex = 1
Top = 1440
Width = 1695
End
Begin VB.FileListBox File1
Height = 2070
Left = 2520
TabIndex = 0
Top = 600
Width = 1695
End
Begin VB.Label Label3
Caption = "文件列表:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2520
TabIndex = 5
Top = 240
Width = 1575
End
Begin VB.Label Label2
Caption = "文件夹列表:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 4
Top = 1200
Width = 1575
End
Begin VB.Label Label1
Caption = "驱动器:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 3
Top = 240
Width = 1575
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Drive1.Drive = "C:"
Dir1.Path = "c:\windows"
File1.Pattern = "*.ini"
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
File1.Path = Dir1.Path
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub File1_DblClick()
Dim Fname As String, StrLine As String
Fname = File1.Path & "\" & File1.FileName
Open Fname For Input As #1
Do While Not EOF(1) '循环至文件尾。
Line Input #1, StrLine '读入一行数据并将其赋予某变量
Debug.Print StrLine
Loop
Close #1
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?