Showing Help .chm and TopicID

Hi,
I am VERY new to C# and am trying to implement my help files into this program.  In vb6 i just referenced the help file location when the program started and then for each help button referenced the topic ID.
I have looked on MSDN, but it's all greek to me.  Does anyone have an easily understandable example of how to implement help within a C# program?
Thanks,
SheritlwAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eyal-ShilonyCommented:
0
SheritlwAuthor Commented:
Hi,
I have studied the link and tried implementing according to the .Net 1 instructions (although I use version 2 framework) with no luck.
Again I am very new to C# and this program is already coded, so I don't even know where to put the information.  
I added the HelpProvider to the form and tried putting the lines in that link all over the place, but kept getting errors.
I need an example (no more links please) of where to put things, (very different than vb6) .  For example, what part of the code does the namespace get referenced?  
Also the example provided in the link for a .chm file is for hooking up to a button or dialog.  I have a button on each form and contextIDs that relate to each for within my help file.  I need to know how to hook it up to show the context id from the help file.
Thanks,
0
xPert_UmerCommented:

to make it simple for you
follow these line of codes
// get environment variable representing the Windows folder
String s = Environment.GetEnvironmentVariable("windir");
// set h to WindowsPath\Help\helpfile  here you need to put chm file
String h = s + "/Help/MyHelpFile.chm";
now below code line should be put on button event in that event, check your contextid or whatever condion on that condition change the file name written below
Help.ShowHelp(this, HelpProvider1.HelpNamespace);
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

xPert_UmerCommented:
or
Help.ShowHelp(this, HelpProvider1.HelpNamespace);
0
xPert_UmerCommented:
The HelpProvider component can be dragged on to your Windows Form from the Toolbox. It will likely be automatically named HelpProvider1. I normally change it to something like hlpPrvMain or anything more appropriate and on the mark. The only really relevant property you need to set at design-time is the HelpNamespace property, which holds a string value representing the path to the HTMLl Help source file. The source file may be any .htm or .chm file.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SheritlwAuthor Commented:
I have set the namespace property, but am having difficulty setting the the contextid.
I have one help button but will detect which form is active and then specify which context id to use.
I keep getting errors and don't have any properties available for help to navigating to the correct context id.
This is what I have started with.
if (AddEmpForm.ActiveForm)
      {
        this.helpProvider1 ???= "html\\1150.htm";
      }
0
SheritlwAuthor Commented:
Anyone know about implementing a .chm file in C#
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.