发布网友 发布时间:2023-10-25 16:16
共1个回答
热心网友 时间:2024-11-23 19:47
图片文件 “C:\Users\admin\Pictures\2012-12-13 001" 应该有扩展名的,不如jpg,bmp,明显你这个路径不对,应该包含图片文件名追答shell一般是用来执行exe文件,要打开文本文件,音频文件,图片文件等请使用api:ShellExecute
会按系统默认的打开方式打开。
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
dim lA as long
la=ShellExecute(form1.hWnd, "open", "C:\Users\admin\Pictures\2012-12-13 001\2.jpg
", "", "", 1)