0

I am working on a basic calculator and I want to have a Help in it. I've already written it in XHTML. It is about 30 html files and over 30 jpg files (everything in a folder 'help').

Now a I would like to add this all into my Form. I don't know to add it to the Resources and how to open the 'index.html' file. I thing the System.Diagnostics.Process.Start(); is used for such things, but I've never worked with it. The activation event for this will be click on the 'ToolStripMenuItem'.

And my next question is: When I add all the files to the Project and publish the program (so it can be installed) would the System.Diagnostics.Process.Start(); work for every user? Because I don't know in which folder would the program be install.

John Saunders
  • 160,644
  • 26
  • 247
  • 397

1 Answers1

1

Okay you are confusing a number of different things here. If you want to distribute your help as separate files, you don't want resources.

Just add a folder called help to your solution/project in the solution explorer, move the files into it with windows explorer. Then right click on the folder, choose add existing items, select all your files. Then the important bit on each on them in the solution explorer, select properties , and make sure sure they are copy always, or copy if newer. . Now when you build your project, the help files will go with it, but not in a help folder! Then you can launch index.html (in the same folder as your app) and the app (almost certainly a browser) associated will fire up with that file.

Resources, would mean the files were not separate, they would be compiled in with your assembly, and you'd have to extract them to launch externally or include your own help form with a be browser control. Have to be damn good reason to do all that work...

If you want one though. Right click on the project, select properties, select the resources tab.

Tony Hopkinson
  • 20,172
  • 3
  • 31
  • 39
  • OK, I've done it, but when I wanted to open the file index.html there was an error. The program can't find the file... – Vojtěch Lőffelmann Dec 29 '12 at 01:49
  • Just passing index.html? Few ways round that, but if it's in the same folder as your exe, then Process.Start(Path.Combine(System.Application.ExecutablePath,"index.html")) is one way. If not, ask another question and post some code. – Tony Hopkinson Dec 29 '12 at 19:52