ZKX's LAB

vb目录列表框 建立 vb的驱动器列表框 目录列表框 文件列表框怎么画

2020-09-27知识13

建立一个图形浏览器。窗体上放置驱动器列表框,目录列表框,文件列表框,组合框两个标签和一个图像框。 我跟你学的是一样的,要求我知道,程序绝对可以用。(亲手做的,要给分哦~)以下:Private Sub Combo1_Click()Select Case Combo1.TextCase\"*.wmfFile1.Pattern=\"*.wmfCase\"*.bmpFile1.Pattern=\"*.bmpCase\"*.IcoFile1.Pattern=\"*.IcoEnd SelectEnd SubPrivate Sub Dir1_Change()File1.Path=Dir1.PathEnd SubPrivate Sub Drive1_Change()Dir1.Path=Drive1.DriveEnd SubPrivate Sub File1_Click()Dim fname$fname=File1.Path+\"\\\"+File1.FileNamePicture1.Picture=LoadPicture(fname)Label1.Caption=File1.Path+\"\\\"+File1.FileNameEnd SubPrivate Sub File1_DblClick()Dim i%If File1.Pattern=\"*.bmp\"Theni=Shell(\"C:\\windows\\system32\\mspaint.exe\",1)End IfEnd SubPrivate Sub Form_Load()Combo1.AddItem\"*.wmfCombo1.AddItem\"*.bmpCombo1.AddItem\"*.IcoEnd Sub

VB编程中如何向列表框中添加文件目录?求助源代码,谢谢 建立一个按钮,在事件中加入:Private Sub Command1_Click()list1.additem(\"目录字符串\")End Sub

VB问题,在窗体上建立一个驱动器列表框、目录列表框、文件列表框、图片框、文本框? 在file1的属性页里的pattern属性里输入*.jpg;bmp;gif然后填写如下代码Private Sub Dir1_Change()File1.Path=Dir1.PathEnd SubPrivate Sub Drive1_Change()Dir1.Path=Drive1.DriveEnd SubPrivate Sub File1_Click()Picture1.Picture=LoadPicture(Dir1.Path&\"\\\"&File1.FileName)Text1.Text=Dir1.Path&\"\\\"&File1.FileNameEnd SubPrivate Sub Form_Load()Drive1.Drive=\"d\"End Sub

VB问题,在窗体上建立一个驱动器列表框、目录列表框、文件列表框、图片框、文本框。 Private Sub File1_Click()If File1.ListCount>;0 Then' Command1.Enabled=TrueText1.Text=File1.Path+File1.FileNameDim objPic As PictureSet objPic=LoadPicture(Text1.Text)Picture1.Picture=objPicEnd IfEnd SubPrivate Sub Form_Load()Drive1.Drive=\"d:Dir1.Path=\"d:\\\"' Drive1.DriveDir1.RefreshFile1.Pattern=\"*.jpg;bmp;gif|(*.bmp,*.gif,*.jpg)File1.Path=Dir1.PathEnd SubPrivate Sub Drive1_Change()Dir1.Path=Drive1.DriveEnd SubPrivate Sub Dir1_Change()File1.Path=Dir1.PathEnd Sub

随机阅读

qrcode
访问手机版