Connect help file to application

I want to connect a help file (.chm) to my window. How can i do this? Thank.

+3
source share
4 answers

try it

string fbPath = Application.StartupPath;
string fname = "help.chm";
string filename = fbPath + @"\" + fname;
FileInfo fi = new FileInfo(filename);
if (fi.Exists)
{
Help.ShowHelp(this, filename, HelpNavigator.Find, "");
}
else
{
MessageBox.Show("Help file Is in Progress.. ",MessageBoxButtons.OK, MessageBoxIcon.Information);

}
+5
source

Use the Help.ShowHelp method to click on buttons, etc.:

private void button1_click(object sender, EventArgs e)
{
      string helpfile = "C:\MyHelp.chm";
      Help.ShowHelp(this, helpfile, mypage.htm);
}

and link your help with the F1 key, see this guide for a detailed explanation of how to do this:

http://www.dotnetspark.com/kb/162-open-help-file-on-f1-function-key-press.aspx

+3
source

Help.ShowHelp.

MSDN:

private void Button1_Click(System.Object sender, System.EventArgs e)
    {

        Help.ShowHelp(TextBox1, "file://c:\\charmap.chm");
    }

SO-:

+2
source

For Winforms, the excellent Windows Forms Programming provides a very good overview (chapter 3, with help). Some pointers:

+1
source

Source: https://habr.com/ru/post/1773231/


All Articles