Rano AH

Rano AH

  • NA
  • 176
  • 111.8k

Where to save the help file to display it among servral pcs.

Nov 26 2013 6:58 AM


Hi

For the implementation below, When I run the application on my machine the help file will be displayed if I click on the help button or when I hit F1 key.


But, when I make the installer or try this on another workstation, then it wont run. I know that this is because of the help file location. But what is the best location to save the pdf help file? Did I also miss something? I want other user to be able to view it if they use the application on their computers. 

Also, I did the following to embed a file in my application and start it:
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


My implementation:

private void hELPToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
               System.Diagnostics.Process.Start("C:\\Users\\User\\Documents\\Visual Studio 2010\\Projects\\Project\\Resources\\HelpFile.pdf");
            }
            catch (Exception )
            {
            }

        }


       


private void Form1_KeyDown(object sender, KeyEventArgs e)

{


try
            {
                if (e.KeyCode == Keys.F1)
                {
                   Process.Start("C:\\Users\\User\\Documents\\Visual Studio 2010\\Projects\\Project\\Resources\\HelpFile.pdf");
                }
            }
            catch (Exception ex)
            {
                ex.ToString();
            }