After the file has been selected from OpenFileDialog, I want file to be launched in the respective application - PDF in acrobat reader, word in winword and so forth.I am looking for built in functionality if it exists, please advise.
1 Answer
Try
Process.Start("file.pdf")
3 Comments
Kumar
I am familiar with that approach but I was expecting something in built within OpenFileDialog component. Thanks though !
Dominik
If you´re using the default windows OpenFileDialog, you can right-click the file and choose the default explorer actions for this file type. Other than that, the OpenFileDialog just gives you the information about the selected file.
brunnerh
@Kumar: You can only get file streams from that dialog (using
OpenFile() for example) like this, it's an OpenFileDialog after all, not a LaunchFileWithWhateverApplicationDialog...