By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,741 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

Open file with associated app

P: n/a
Hi,

I can probably use "Shell" function to open an app with a switch to open a
selected file.

But is it possible to read the application that a file type has been
associated with to determine which application name to pass to the "Shell"
function?

I am trying to emulate the user double clicking on a file selected in
Explorer.
My VB.Net does not know which file or file type will be selected.

Or is there another approach.

Thanks

Doug
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi,

If you use process.start("YourFile") it will open it up in the
program associated with that file extension.

Ken
--------------------
"Doug Bell" <Po*********@vodaphone.com.au> wrote in message
news:eI*************@TK2MSFTNGP12.phx.gbl...
Hi,

I can probably use "Shell" function to open an app with a switch to open a
selected file.

But is it possible to read the application that a file type has been
associated with to determine which application name to pass to the "Shell"
function?

I am trying to emulate the user double clicking on a file selected in
Explorer.
My VB.Net does not know which file or file type will be selected.

Or is there another approach.

Thanks

Doug

Nov 21 '05 #2

P: n/a
"Doug Bell" <Po*********@vodaphone.com.au> schrieb:
But is it possible to read the application that a file type has been
associated with to determine which application name to pass to the "Shell"
function?


Opening files, applications, Web documents, and the mail client
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=openfileappwebpage&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
Thanks Herfried

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eJ**************@TK2MSFTNGP14.phx.gbl...
"Doug Bell" <Po*********@vodaphone.com.au> schrieb:
But is it possible to read the application that a file type has been
associated with to determine which application name to pass to the "Shell" function?


Opening files, applications, Web documents, and the mail client
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=openfileappwebpage&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

P: n/a
Thanks Ken
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi,

If you use process.start("YourFile") it will open it up in the
program associated with that file extension.

Ken
--------------------
"Doug Bell" <Po*********@vodaphone.com.au> wrote in message
news:eI*************@TK2MSFTNGP12.phx.gbl...
Hi,

I can probably use "Shell" function to open an app with a switch to open a selected file.

But is it possible to read the application that a file type has been
associated with to determine which application name to pass to the "Shell" function?

I am trying to emulate the user double clicking on a file selected in
Explorer.
My VB.Net does not know which file or file type will be selected.

Or is there another approach.

Thanks

Doug


Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.