Home All Groups Group Topic Archive Search About

how to open files from .net app

Author
12 Jul 2006 7:28 PM
graphicsxp
Hi,
I loop through the files in a directory and I add the name of each file
as items of a listbox to my .net Application.

Now I would like to be able to open a file by clicking on the item in
the list. The file could be anything (pdf; jpg, mp3, doc...) and should
be opened with the default windows application for that particular type
of file.

How can I do that ?

Thanks

Author
12 Jul 2006 7:41 PM
Herfried K. Wagner [MVP]
"graphicsxp" <samuelberthe***@googlemail.com> schrieb:
> Now I would like to be able to open a file by clicking on the item in
> the list. The file could be anything (pdf; jpg, mp3, doc...) and should
> be opened with the default windows application for that particular type
> of file.

\\\
Imports System.Diagnostics
....
Process.Start(<file name>)
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
12 Jul 2006 9:20 PM
graphicsxp
Thanks Herfried, exactely what I needed :)
Herfried K. Wagner [MVP] wrote:
Show quoteHide quote
> "graphicsxp" <samuelberthe***@googlemail.com> schrieb:
> > Now I would like to be able to open a file by clicking on the item in
> > the list. The file could be anything (pdf; jpg, mp3, doc...) and should
> > be opened with the default windows application for that particular type
> > of file.
>
> \\\
> Imports System.Diagnostics
> ...
> Process.Start(<file name>)
> ///
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>