展开全部
'下面的api会自动按系统默认程序打开。
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
调用格式:ShellExecute(form.hWnd, "open", "文件含路径", "", "", 1) '
例如:=ShellExecute(form.hWnd, "open", "d:\system\1.txt", "", "", 1) '
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
调用格式:ShellExecute(form.hWnd, "open", "文件含路径", "", "", 1) '
例如:=ShellExecute(form.hWnd, "open", "d:\system\1.txt", "", "", 1) '
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询