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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…