如何使用Button连接到PDF文件 [英] How to connect with a Button to PDF file

查看:79
本文介绍了如何使用Button连接到PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,请帮助我解决这个问题....

我已经通过单击添加退出文件..."将PDF文件导入到我的项目中.

现在要在按钮上显示此文件,请单击....
但我无法连接它.....
请帮助我如何连接它..........



N.K.UPADHYAY

Dear all please help me to solved this provlem ....

I have imported a PDF file in my project by clicking Add Exiting file....

Now to want to show this file on a button click ....
but i am not able to connect it.....
please help me how to connect it..........



N.K.UPADHYAY

推荐答案

通过连接",我想你的意思是你希望继续使用向导而不编写实际的代码?


Process.Start(@"c:\ myPDF.pdf");

将在该位置打开PDF.我认为它是System.Diagnostics之一,您需要包含它才能正常工作.
By ''connect'' I assume you mean that you hope to keep using Wizards and not writing actual code ?


Process.Start(@"c:\myPDF.pdf");

will open a PDF in that location. I think it''s System.Diagnostics you need to include for that to work.


请查看Process.Start [ ^ ]方法:将其作为pdf文件的路径,然后将其打开.
Look at the Process.Start[^] method: feed it the path of the pdf file, and it will open it.


这篇关于如何使用Button连接到PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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