Open Another Application from a Windows Form
-
This is probably a simple question, but how do I open another application from a Windows form? What I basically want to do is execute a search for a file or files, have those files appear in a listbox, then have the application open the selected file using a specific application installed on the user's desktop. It's basically a simplified Windows search application designed for a very specific purpose. Thanks.
-
This is probably a simple question, but how do I open another application from a Windows form? What I basically want to do is execute a search for a file or files, have those files appear in a listbox, then have the application open the selected file using a specific application installed on the user's desktop. It's basically a simplified Windows search application designed for a very specific purpose. Thanks.
Use System.Diagnostics.Process.Start to start the application. If the file is associated with a default application, that application will be started up - so, for instance, executing
Process.Start(@"c:\MyFile.doc");
would start Word and load that document.Deja View - the feeling that you've seen this post before.
-
This is probably a simple question, but how do I open another application from a Windows form? What I basically want to do is execute a search for a file or files, have those files appear in a listbox, then have the application open the selected file using a specific application installed on the user's desktop. It's basically a simplified Windows search application designed for a very specific purpose. Thanks.
System.Diagnostics.Process.Start
Eslam Afifi