Rano AH

Rano AH

  • NA
  • 176
  • 111.5k

How to embed a pdf help file in my C# windows form applicati

Nov 27 2013 1:55 AM

How to embed a pdf help file in my C# windows form application?

Actually, I don't want the help file to be displayed only in my machine. If I run it on another machicne then pdf file can be also displayed.
I did the following, but still didn't work. I read also that I will have to write the bytes[] but couldn't do that can you guide me plz?

1.Right click your project and select Add - Existing Item
2.Select your file (don't double click it) •Click the little arrow next to the Add button and select Add As Link

3.Double click on Properties - Resources.resx
4.Click the little arrow next to Add Resource and select Add Existing File
5.Select the same file again in the open dialog


 private void helpToolStripMenuItem_Click(object sender, EventArgs e)
  {
 try
 {
  process.start (@"C:\myFolder\HelpFile.pdf");
 }
 catch (exception)
 {
 }  

   }

  private void Form1_KeyDown(object sender, KeyEventArgs e)
   {
            try
            {
                if (e.KeyCode == Keys.F1)
                {
   process.start (@"C:\myFolder\HelpFile.pdf");
  }
     }
 
 catch (exception)
 {
 }  

   }