vb中如何让dirvelistbox filelistbox listbox组合起来使用 就是选择路径 举个例子

 我来答
匿名用户
2013-05-17
展开全部
dirvelistbox filelistbox listbox组合?
应该是dirvelistbox filelistbox dirlistbox组合吧?
我做了个选图片的 道理一样控件有dirvelistbox filelistbox dirlistbox,2个command1个Image
Private Sub Command1_Click()
Form12.Image1.Refresh
Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

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

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

Private Sub File1_Click()
Dim K As String
If Right(Dir1.Path, 1) <> "/" Then
K = Dir1.Path + "/" + File1.FileName

Else
K = Dir1.Path + File1.FileName
End If
Image1.Picture = LoadPicture(K)
Form11.Image1.Picture = LoadPicture(K)
End Sub

Private Sub Form_Load()
Me.Top = (Screen.Height - Me.Height) / 2
Me.Left = (Screen.Width - Me.Width) / 2

Drive1.Drive = Left(App.Path, 2)
File1.Pattern = "*.bmp;*.jpg;*.gif;*.jepg;*.jpeg"
Image1.Stretch = True
End Sub
自己看看吧
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式