1

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 1

2

Try Process.Start("file.pdf")

Sign up to request clarification or add additional context in comments.

3 Comments

I am familiar with that approach but I was expecting something in built within OpenFileDialog component. Thanks though !
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.
@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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.