Home > Archive > Visual Basic > February 2005 > Open a pdf file in default pdf viewer from VB 6.0
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Open a pdf file in default pdf viewer from VB 6.0
|
|
| mikeymontex 2005-02-25, 8:55 pm |
| I thought I was trying to do something really simple, but can't figure it out.
I want to be able to click on a command button and have a known pdf
file open up in a user's default pdf browser. (Kind of like when you double
click a pdf file from windows explorer)
Is there an easy way to do this, or some code that will determine the location
of the default application (in this case pdf) executable file?
Shell only seems to work on executable files... I can run an application, but
don't know how to then open up a specific file within that application.
| |
| Mike D Sutton 2005-02-25, 8:55 pm |
| > I thought I was trying to do something really simple, but can't figure it out.
>
> I want to be able to click on a command button and have a known pdf
> file open up in a user's default pdf browser. (Kind of like when you double
> click a pdf file from windows explorer)
>
> Is there an easy way to do this, or some code that will determine the location
> of the default application (in this case pdf) executable file?
>
> Shell only seems to work on executable files... I can run an application, but
> don't know how to then open up a specific file within that application.
Have a look at the ShellExecute() API call, this comes up all the time so a quick hunt on the archives
(groups.google.com) will turn up plenty of results.
Hope this helps,
Mike
- Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: Http://EDais.mvps.org/
|
|
|
|
|