第一个功能,第二个功能都在下面的代码里。
需要添加1个CommonDialog 2个text 2个Command
Private Sub Command1_Click()
CommonDialog1.ShowOpen
Text1.Text = CommonDialog1.FileTitle
Text2.Text = CommonDialog1.FileName
End Sub
Private Sub Command2_Click()
CommonDialog1.ShowSave
Text1.Text = CommonDialog1.FileTitle
Text2.Text = CommonDialog1.FileName
End Sub
Private Sub Form_Load()
Text1.Text = "文件名"
Text1.Text = "文件路径"
Command1.Caption = "打开文件"
Command1.Caption = "保存文件"
End Sub
第三个功能
需要添加1个text 1个Dir 1个Drive
Private Sub Dir1_Change()
Text1.Text = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub Form_Load()
Text1.Text = "文件夹路径"
End Sub