如何从vb6应用程序查看pdf文件 [英] How to view pdf files from vb6 application

查看:306
本文介绍了如何从vb6应用程序查看pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从Windows XP SP3中的vb6应用程序中打开pdf文件,但无法从Windows 7中打开该文件,请帮助.在此先感谢

I can open pdf files from vb6 application in Window XP SP3, but I am unable to open the same from Windows 7, pls help. Thanks in advance

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpszOp As String, _
ByVal lpszFile As String, ByVal lpszParams As String, _
ByVal LpszDir As String, ByVal FsShowCmd As Long) _
As Long
Dim l As Long
'it works in windows XP SP3
l = ShellExecute(Me.hwnd, "Open", App.Path & "\Forms\Form.pdf", "", "C:\ProgramFiles(x86)", vbNormal

推荐答案

"C:\ ProgramFiles(x86)"应为"C :\ Program Files(x86)".我不知道这是否是您的问题的根源,但可能是这样.(有一个环境变量ProgramFiles(x86),但是文件夹中有空格)
"C:\ProgramFiles(x86)" should be "C:\Program Files (x86)". I don''t know if that''s the source of your problem, but it could be. (There is an environment variable ProgramFiles(x86), but the folder has spaces)


这篇关于如何从vb6应用程序查看pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆