Click here to Skip to main content
15,906,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#

Hi all,

I have a User Manual(.pdf) that opens via a hyperlink in my application.

To make it easer to install. I added the .pdf as an embedded resourse.

Now I am not sure what the path is.

This is what i had using a root path:

C#
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
       {

           /// link to help file ///////

           System.Diagnostics.Process.Start("C:\\sinter plant\\sinter plant\\User Manual.pdf");
       }


How do i do this using the embedded file. my Assembly name is "sinter_plant"

Kind Regards
Nicole
Posted

Have a look at res Protocol[^]

Use IE to open the file, and it will use the res protocol handler.

Best regards
Espen Harlinn
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 18-Aug-12 12:54pm    
To the point, a 5.
--SA
Espen Harlinn 18-Aug-12 12:57pm    
Thank you, Sergey - not only can it be done, it's also pretty easy.
Sergey Alexandrovich Kryukov 18-Aug-12 13:22pm    
...and extremely useful for embedded browser, because the ugly alternative would be having resources in executable directory in separate files, with clutter and risk to loose or screw up them.
--SA
nikki88 20-Aug-12 5:54am    
Thank you Espen, that worked out for me :)
Espen Harlinn 20-Aug-12 5:56am    
Brilliant :-D
First google hit[^]. Your resource is in your file, but not in a usable form. As it's a PDF, you'll need to write it to the file system ( and you can't do that in your program directory due to permissions issues ) in order to open it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900