MPIon
Well-known member
I have upgraded my project from Net Framework to Net 7.
In Net Framework, when I wanted to open up an application (such as Photo Viewer or Media Player), all I had to do was include the following code :
It would then start the appropriate default program based on the file type.
In Net 7, this does not seem to work. All the examples I have seen, seem to need to specify the actual application to start, e.g.
Surely there must be some equivalent code in Net 7 to just open the default application given just the full file path?
In Net Framework, when I wanted to open up an application (such as Photo Viewer or Media Player), all I had to do was include the following code :
C#:
Process.Start(<full file path name>)
In Net 7, this does not seem to work. All the examples I have seen, seem to need to specify the actual application to start, e.g.
C#:
Process process = new Process();
process.StartInfo.UseShellExecute = true;
process.StartInfo.FileName = "C:\Windows\notepad.exe";
process.StartInfo.Arguments = @<file name>;
process.Start();
Surely there must be some equivalent code in Net 7 to just open the default application given just the full file path?