In my C# application, I would like to launch the default image editor to edit an image.
When I'm using System.Diagnostics.Process.Start("C:\\image.png")
it opens the image file using the Windows Photo Viewer.
When I right-click on the image file in Windows Explorer, there is a "Edit" menu item which launches Microsoft Paint (by default). I would like to do the same in my application (i.e. open the file using the default image editor).
I don't want to hardcode MS Paint by doing Process.Start("mspaint.exe C:\\image.png")
. I would prefer to use the default image editor program set by the user (which can be different from MS Paint).
Is there a way to do this?
Thanks Frank
Microsoft Photos, the free photo viewer and editor included with Windows 10, offers competent image editing and photo enhancements along with tools for organizing and editing videos, all in a touch-friendly interface.
You can try starting a process with a verb edit
.
ProcessStartInfo startInfo = new ProcessStartInfo("C:\\image.png");
startInfo.Verb="edit";
Process.Start(startInfo);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With