opening files (edit verb) with associated program

  • Thread starter Thread starter Cy Huckaba
  • Start date Start date
C

Cy Huckaba

I am writing a program that will search xml files for some of our dev team here
and list the files in a list box. I would like to be able to double-click on the
file name and have the file open with the users preferred editor. The problem is
that some of our teams uses different editors and I want the action to launch
the file with the edit verb so that the users editor will launch, regardless of
what that program is.

Is there a way to find out which exe is associated with the edit verb on a file
type? and launch it?

I have used the shell functions before when I knew specifically what the editor
was...but I don't want to have to handle every possible editor that we use.

Thanks,

Cy Huckaba
Austin, TX
 
Hello,

Cy Huckaba said:
I am writing a program that will search xml files for some
of our dev team here and list the files in a list box. I
would like to be able to double-click on the file
name and have the file open with the users preferred
editor. The problem is that some of our teams uses different
editors and I want the action to launch the file with the edit
verb so that the users editor will launch, regardless of
what that program is.

Is there a way to find out which exe is associated with the
edit verb on a file type? and launch it?

Have a look at the 'System.Diagnostics.Process.Start' method.

HTH,
Herfried K. Wagner
 
Back
Top