473,385 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Show PDF file in program

Hi,

I have included a PDF file in my project, when the user clicks a button
I want that file to display, is this simple? How can I go about this?

Thank you

Jan 15 '07 #1
1 5481
Hi,

Create a Form, place a WebBrowser control on that form, then call that
browser's "Navigate" method with the PDF file as a target.

The other way is to launch Adobe Reader as a process:

ProcessStartInfo psi = new ProcessStartInfo();

psi.FileName = "FileName.pdf";

Process proc = new Process();

proc.StartInfo = psi;

try

{

proc.Start();

}

catch( Exception exp )

{

MessageBox.Show( this, "FileName.pdf: " + exp.Message, "Exception",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation );

}

"Feldaspar" <an*********@hcn.com.auwrote in message
news:11**********************@38g2000cwa.googlegro ups.com...
Hi,

I have included a PDF file in my project, when the user clicks a button
I want that file to display, is this simple? How can I go about this?

Thank you

Jan 16 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Al Davis | last post by:
Note: I tried cross-posting this message to several newsgoups, including comp.lang.perl.misc, c.l.p.moderated, comp.infosystems.www.authoring.cgi, comp.lang.javascript and comp.lang.php. Nothing...
9
by: Christoffer T | last post by:
Sorry for bad subjekt. I have just started to learn programing, and python sound like a god choice. But there is something I do not understand. I want to write the code in notepad, and then...
2
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works,...
1
by: Ivaylo | last post by:
Hello , Do you know the way how show 'OpenWith..' dialog from the C# program? I try to open the file content in my program in this way:...
12
by: Benson | last post by:
I want to write a program to display files (xls, doc,html,pdf,jpg) on screen. I thought I can use WebBrowser in VB2005 to do this job since those kinds of files can be displayed in IE. I try to...
2
by: DBC User | last post by:
I have to write a program, all it has to do is read in the name of the chm file passed to it and show the chm file. I wrote a batch file called test.bat and which will accept the chm file name...
0
by: Jim88 | last post by:
Hi, I'm having a problem to show a screen as vbmodal in the environment below. Platform: windows vista Language: VB 6 Currently, I have a executable file called StartShell.exe, that will...
3
by: jctwin9 | last post by:
I've been trying to clean up the installer I created using vb 2005 as best as possible to finalize a project I am working on. I have my installer deploying a .pdf file in the application folder. I...
1
by: flg22 | last post by:
Hi I am working on this Rock, paper, scissors java game and the program works, but I can not figure out how to get the images to load onto the program. So my question is how do I get the images to...
7
by: kooroshkdt | last post by:
hi everyone, i'm not beginner but i learn programing in hack kind, i don;t have any idea about my problem(in C++ wrote)!!! Read Plz post if u have any Idea, i want to here it, it will be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.