Start another process from wpf application

Posted by Jpchoudhari under C# on 8/4/2011 | Points: 10 | Views : 2353 | Status : [Member] | Replies : 1
Hi,

I want to give user a option to open a file in their default installed program.

Ex.

I am displaying files list (mostly text files, word files and image files).
I want to give a context menu on right click and will populate with the available installed programs and user will able to launch that file.
(he can right click on image file and open that file in say photoshop or illustrator)

can we do this in .net.

Kind Regards,
Jay



Responses

Posted by: Dhirendra on: 8/12/2011 [Member] Starter | Points: 25

Up
0
Down
you can directly open any file with specific program associated with the extension of the file.
just execute this below code and specified your file path with file name.
Process.Start(@"D:\MyPhoto.jpg");

Jpchoudhari, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response