
Help:(Immediate) Reading Pdf (acrobat reader) files from Visual Basic
You want to use the ShellExecute windows API function. This function
launches a file with it's associated program as listed in the windows
registry.
Here is an example that launches an html file into a web browser:
Dim ret as long
ret = ShellExecute(MDIForm1.hwnd, "Open", "c:\test\test.html", "",
App.Path, 1)
Replace the MDIForm1 with your form's name. Replace the c:\test\test.html
with your pdf filename. App.path should be ok the way it is. The number 1
indicates that the program should load maximized.
You will need to do some checking of the return value and handle it
accordingly. This should get you on your way.
Look up ShellExecute in the MSDN on-line help, it will give you a more
detailed explanation.
Hope this helps.
Cheers
Rob
Quote:
>Hi!
>I have a User Manual in Acrobat reade (pdf) format. How can I read the pdf
file within my visual Basic application. I tried launching the acrobat
reader using SHELL function, but that might be a problem when I distribute
my VB application, cause I would not know the path, where the acrobat
application might reside, it might be different for different computers.
SO, is there any other way to find out the path where the acrobat might be
and then use the SHELL function to launch the application?
Quote:
>I would really appreciate it, if somebody could provide me some
>snippets of the code to do that....
>I need it immediately....
>Thank YOu...
>Srinivas
>-----------------** -- Posted from CodeGuru -- **-----------------
>http://www.codeguru.com/vb The website for VB programmers.