|
楼主 |
发表于 2013-9-1 14:54
|
显示全部楼层
jsxjd 发表于 2013-9-1 14:33
Cr.show
If … then …
谢谢啦 可以了- Private Sub Image1_Click()
- Dim cr As FileDialog
- Set cr = Application.FileDialog(msoFileDialogFilePicker)
- With cr
- .ButtonName = "浏览"
- .Title = "请浏览图片文件"
- .AllowMultiSelect = True
- .Filters.Clear
- .Filters.Add "支持的图片文件(*.JPG,*.PNG,*.GIF,*.TIFF,*.JPEG,*.BMP)", "*.JPG,*.PNG,*.GIF,*.TIFF,*.JPEG,*.BMP"
- End With
- If cr.Show = True Then
- Image1.Picture = LoadPicture(cr.SelectedItems(1))
- Image1.PictureSizeMode = fmPictureSizeModeStretch
- End If
- End Sub
复制代码 |
|