在 vb.net 中包含和调用 PDF 文件(部署后) [英] Include and Call PDF File in vb.net (after Deployement)

查看:25
本文介绍了在 vb.net 中包含和调用 PDF 文件(部署后)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很高兴看到这个网站,感谢大家的积极参与.:)

Glad to see this site, Thanks guys for being active. :)

我在 Visual Studio 2010/VB.Net 中遇到问题

I have a problem in Visual Studio 2010/VB.Net

我在 Visual Basic 中有 Windows 窗体,我将软件(窗体)部署到一个安装程序现在我想用 Button_Click_Event 打开我的 PDF 文件(即特定的)我知道:

I have windows form in Visual Basic, I deployed the software(form) to one installer Now I want to open My PDF file( i-e: Specific) with Button_Click_Event I know that:

Process.Start("MyPDF.pdf")

但我不知道用户是否在他的 PC 上安装了我的软件,所以他可能将软件安装在 C D 或其他目录中,而且我也不知道如何在我的项目中包含 PDF 文件:)请给我建议,我到处都在搜索这个,但失败了,所以请帮帮我

But I dont know if user install my software in his PC so may be he install the software in C D or other directory, and also I dont know How to include PDF file in my project :) Please suggest for me, I am searching this every where but failed so pl help me

推荐答案

在您的项目中使用 Add->Existing Item.
然后将 PDF 文件添加到您的项目中.
之后,您必须将新添加文件的属性设置为以下内容:

Use Add->Existing Item on your Project.
Then add the PDF File to your Project.
Afterwards you have to set the Properties of the newly added file to the following:


现在,在您构建项目后,该文件将被添加到您的输出"目录中.
现在使用您的 Process.Start("MyPDF.pdf") 调用.它将打开,因为它位于同一目录中.


Now the file will be added to your "Output" Directory after you build your Project.
Now use your Process.Start("MyPDF.pdf") call. It will open up, as it resides in the same directory.

这篇关于在 vb.net 中包含和调用 PDF 文件(部署后)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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