calling an adobe pdf file from code

I would like to click a button on my dialog box which will display a help file in pdf format.  So, essientially I would like my button to work like a link to a pdf file on a web page, and have the acrobat reader pop-up and display the pdf file.  I know it sounds simple but...

Who is Participating?
nietodConnect With a Mentor Commented:
In windows you can use the ShellExecute() windows API function to do this.  It will look at the extension of the specified file (.pdf) and will use that to find a program that can open that file (probably adobe acrobat) and will execute the program and pass it the specified file name.  

Let me know if you have any questions.
An example might be


where DlgHnd is the handle to your dialog window.
rampage09Author Commented:
Thanks!  Thats just what I needed.
nietod: I hope you get residual points every time somebody reads your answer!
Regretabley no.  Its been discussed, but was not choosen for implimentation.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.