Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to open a file such as pdf,etc "from" a windows form app in C#

Tags:

pdf

c#-4.0

I want to create a windows form containing a linklable such that when user clicks on that linklable, a file with some format(for example a pdf file or html file) which is added to resources,opens. it will not be opened in form,it means the file will be opened out of program with adobe reader or another program. How can I do this? Thank you

like image 938
samsam114 Avatar asked Feb 27 '23 14:02

samsam114


1 Answers

You'll have to extract this file from resources (I'm assuming we're talking assembly-embedded resources here) to %temp% and then just Process.Start() it. Make sure extracted file has proper extension, though.

like image 164
Anton Gogolev Avatar answered Apr 07 '23 14:04

Anton Gogolev