Simple Open File With... Question
-
I'm trying to open a file pragmatically with an application that is not the default and with out setting it as a default. For example: I have a myfile.bmp. My default photo viewer is Microsoft Fax Viewer, but I want to open it with Microsoft Paint with out setting Microsoft Paint as the new default. I've been playing with Process.Start("myfile.bmp") but can't seem to get anything to work. Any help would be appreciated Best Regards -Chris
-
I'm trying to open a file pragmatically with an application that is not the default and with out setting it as a default. For example: I have a myfile.bmp. My default photo viewer is Microsoft Fax Viewer, but I want to open it with Microsoft Paint with out setting Microsoft Paint as the new default. I've been playing with Process.Start("myfile.bmp") but can't seem to get anything to work. Any help would be appreciated Best Regards -Chris
You can change file Associations by Shift Right Click. You get a OpenWith in whose target dialog a new association can be saved.
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
I'm trying to open a file pragmatically with an application that is not the default and with out setting it as a default. For example: I have a myfile.bmp. My default photo viewer is Microsoft Fax Viewer, but I want to open it with Microsoft Paint with out setting Microsoft Paint as the new default. I've been playing with Process.Start("myfile.bmp") but can't seem to get anything to work. Any help would be appreciated Best Regards -Chris
It's done also with the Process.Start method but with an overload form of it. Basically you must start the application you desire(in your case mspaint.exe) and specify the name of the file you wish to open as a runtime parameter for mspaint.exe. I've done this once. If I find the code snippet, I'll post it later.