M
Marina Levit
I'd like to open up a file programmatically, but if it is not associated
with an application, then to open up the 'open with' dialog.
I've got the code to do the 'open with' dialog part.
However, if I call Process.Start on a file with an extension not associated
with anything - the file just opens up in notepad. No exception - opens up
with notepad. I'd actually prefer the exception so I know I need to launch
the 'open with' dialog instead.
How do I tell that the file is not associated with an app? And why is the
file being opened with notepad from Process.Start? If I double click on it
in file explorer I get the 'open with' dialog - but Process.Start opens up
notepad, makes no sense to me.
Thanks,
Marina
with an application, then to open up the 'open with' dialog.
I've got the code to do the 'open with' dialog part.
However, if I call Process.Start on a file with an extension not associated
with anything - the file just opens up in notepad. No exception - opens up
with notepad. I'd actually prefer the exception so I know I need to launch
the 'open with' dialog instead.
How do I tell that the file is not associated with an app? And why is the
file being opened with notepad from Process.Start? If I double click on it
in file explorer I get the 'open with' dialog - but Process.Start opens up
notepad, makes no sense to me.
Thanks,
Marina