Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Help file in c#

  • 05-04-2006 10:17AM
    #1
    Closed Accounts Posts: 90 ✭✭


    Hi
    I have a help file (help.chm) that I need to add to an application Im working on.
    Anyone know how to do it?

    I see this in the code (I'm only working on it and dont fully understand it)

    But when I go to the Help toolbar item and then click on any of the drop down items (contents, index, search etc) nothing happens.

    Thanks
    Peter


    //
    // _oHelpMenuBarItem
    //
    this._oHelpMenuBarItem.Items.AddRange(new TD.SandBar.ToolbarItemBase[] {
    this.menuButtonItem14,
    this.menuButtonItem15,
    this.menuButtonItem16,
    this.menuButtonItem18,
    this._oAboutVSABMenuButton});
    this._oHelpMenuBarItem.MergeIndex = 6;
    this._oHelpMenuBarItem.Text = "&Help";
    //
    // menuButtonItem14
    //
    this.menuButtonItem14.Icon = ((System.Drawing.Icon)(resources.GetObject("menuButtonItem14.Icon")));
    this.menuButtonItem14.Text = "&Contents";
    //
    // menuButtonItem15
    //
    this.menuButtonItem15.Text = "&Index";
    //
    // menuButtonItem16
    //
    this.menuButtonItem16.Text = "&Search";
    //
    // menuButtonItem18
    //
    this.menuButtonItem18.BeginGroup = true;
    this.menuButtonItem18.Text = "&Report a Bug";


Comments

  • Registered Users, Registered Users 2 Posts: 15,443 ✭✭✭✭bonkey


    Hi
    I have a help file (help.chm) that I need to add to an application Im working on.
    Anyone know how to do it?

    Have you searched/checked MSDN and/or the Visual Studio help? I'm 99% positive that this is covered in reasonable detail there.
    I see this in the code (I'm only working on it and dont fully understand it)

    But when I go to the Help toolbar item and then click on any of the drop down items (contents, index, search etc) nothing happens.
    Well, that makes sense from teh code that you've pasted. This code defines buttons on a menu. Nothing more. That the menu item happens to be have the text "Help", and the sub-items happen to have the text-values "Contents", "Index" and so forth is (effectively) incidental.

    In other words, this code defines a menu. It does not define any event-handlers for what will happen when the various menu items are clicked.

    jc


  • Registered Users, Registered Users 2 Posts: 1,275 ✭✭✭bpmurray


    It's a long time since I played with on-line help, but I can't imagine it's changed much. The MSDN has all the info you need, and there are independent tools to allow you create & use help, many of which are free. See http://www.thefreecountry.com/programming/helpauthoring.shtml for tools & other links.


  • Registered Users, Registered Users 2 Posts: 362 ✭✭theone


    I'm assuming you want this in c#,
    This will work if you place your .chm file on your c drive
    Put the code under the click event of your menu item .

    try
    {
    System.Diagnostics.Process proc = new System.Diagnostics.Process();
    proc.EnableRaisingEvents=false;
    proc.StartInfo.FileName="c://help.CHM";
    proc.Start();
    }
    catch (Exception)
    {
    MessageBox.Show("Theres a problem with the path to your helpFile");
    }


Advertisement