Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default edit application

Tags:

c#

Trying to open an image for editing in C#

I can open the file with

System.Diagnostics.Process.Start(fileItem.Path);

This seems to issue the default open command which in my case for jpg files is standard preview, is there any way to use Process to open the file with the associated "Edit" command.

like image 336
klashagelqvist Avatar asked Sep 19 '26 16:09

klashagelqvist


1 Answers

You can use the Verb-Property of the ProcessStartInfoclass

See MSDN

ProcessStartInfo startInfo = new ProcessStartInfo("myfile.jpg");
startInfo.Verb = "edit";
Process.Start(startInfo);
like image 163
Stephan Bauer Avatar answered Sep 21 '26 06:09

Stephan Bauer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!