If I have a path of any kind of file (.doc , .pdf , .png ...etc) and I would like to open that file as it is opened via double click (no need to determine the host program). An example of what I mean is: .doc
file needs to be opened via MS Word or whatever word processor exists in the machine and it is set as defualt word processor.
http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.useshellexecute.aspx
Process proc = new Process();
proc.StartInfo.FileName = "file.doc";
proc.StartInfo.UseShellExecute = true;
proc.Start();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With