Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-21-2001, 09:47 AM
gggreen69 gggreen69 is offline
Junior Member
 
Join Date: Jan 2001
Posts: 19
Default Launching a .pdf ?

I have a menu item for which i would like to to open a .pdf file. How can i do this?

Seth
Reply With Quote
  #2  
Old 02-21-2001, 10:20 AM
k3nx k3nx is offline
Member
 
Join Date: Jul 2001
Posts: 46
Default RE: Launching a .pdf ?

Use the windows API call ShellExecute('open', 'path to pdf', nil, nil, 0);

or something like that, use the online help!
Reply With Quote
  #3  
Old 02-21-2001, 10:23 AM
RainMan RainMan is offline
Member
 
Join Date: Feb 2001
Posts: 91
Default RE: Launching a .pdf ?

First, add the ShellAPI unit to your uses clause, then call ShellExecute to launch the *.PDF file:

if shellexecute(Application.handle,nil, 'C:\MyPDF.PDF', nil,nil,SW_SHOW)< 32 then
ShowMessage('Unable to open file');
Reply With Quote
  #4  
Old 02-22-2001, 07:25 AM
sun sun is offline
Member
 
Join Date: Jan 2001
Posts: 49
Default RE: Launching a .pdf ? - use shellexec if...

win api methode shellexec with pdf-file as parameter will start the application like doubleclick in windows explorer.

see delphi online help
for documentation of shellexec function.

adope acrobat must be installed on users workstation!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 02:32 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.