vb控件操作文件

前端之家收集整理的这篇文章主要介绍了vb控件操作文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

代码如下:

Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub

Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub

Private Sub File1_DblClick()
If Right(File1.Path,1) <> "\" Then
Text2.Text = File1.Path & "\" & File1.FileName
Else
Text2.Text = File1.Path & File1.FileName
End If
End Sub

Private Sub Form_Load() File1.Pattern = "*.*" Text1.Text = "*.*" End Sub

原文链接:https://www.f2er.com/vb/258820.html

猜你在找的VB相关文章