📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form Form2
Caption = "Form2"
ClientHeight = 6345
ClientLeft = 60
ClientTop = 345
ClientWidth = 8895
LinkTopic = "Form2"
ScaleHeight = 6345
ScaleWidth = 8895
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取 消"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5760
TabIndex = 5
Top = 840
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "确 定"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7320
TabIndex = 4
Top = 840
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
Left = 240
TabIndex = 3
Text = "Text1"
Top = 240
Width = 8415
End
Begin VB.FileListBox File1
Height = 990
Left = 240
TabIndex = 2
Top = 4560
Width = 8415
End
Begin VB.DriveListBox Drive1
Height = 300
Left = 240
TabIndex = 1
Top = 840
Width = 5295
End
Begin VB.DirListBox Dir1
Height = 3030
Left = 240
TabIndex = 0
Top = 1320
Width = 8415
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
On Error Resume Next
If YuanFILEname = True Then
Form1.Text1.Text = Form2.Text1.Text
Else
If mubiaoFILEname = True Then
Form1.Text2.Text = Form2.Text1.Text
Else
End If
End If
Unload Me
End Sub
Private Sub Command2_Click()
GoTo Line1 '标签的使用--行标签只有在其所属的过程中才可见
Line1: Text1.Text = File1.Path ''& "\" & File1.FileName
End Sub
Private Sub Drive1_Change()
On Error Resume Next
Dir1.Path = Drive1.Drive
End Sub
Private Sub Dir1_Change()
On Error Resume Next
File1.Path = Dir1.Path ' 设置文件路径。
End Sub
Private Sub File1_PathChange()
On Error Resume Next
Text1.Text = File1.Path & "\" & File1.FileName 'text1 中显示路径和文件。
End Sub
Private Sub File1_Click()
On Error Resume Next
Text1.Text = File1.Path & "\" & File1.FileName
End Sub
Private Sub Form_Load()
On Error Resume Next
Text1.Text = File1.Path & "\" & File1.FileName '在 text1 中显示路径和文件。"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -