how to open files from .net app

G

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
 
H

Herfried K. Wagner [MVP]

graphicsxp said:
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>)
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top