Adding Help To Applications
With Help class, our applications can display either HTMLHelp or Win32 Help.
Help class has 3 main static methods : ShowHelp(), ShowHelpIndex() and ShowPopup(). In this article, I will show how to use these methods.
1. ShowHelp method : displays the content of a Help file.
| public static void ShowHelp(Control parent, string url);
public static void ShowHelp(Control parent, string url, string topic); Parameters : |
Example :
– Display the content of 'TestHelp.chm' file
Help.ShowHelp(this,"TestHelp.chm");
– Display 'Topic1' of 'TestHelp.chm' file
Help.ShowHelp(this,"TestHelp.chm","topic1.htm");
2. ShowHelpIndex method : displays the index of a Help file.
| public static void ShowHelpIndex(Control parent, string url);
Parameters : |
Example :
Display the index of 'TestHelp.chm' Help file
Help.ShowHelpIndex(this,"TestHelp.chm");
3. ShowPopup method : displays a Help pop-up window.
| public static void ShowPopup(Control parent, string caption, Point location);
Parameters : |
Example :
Display the pop-up window at index of 'TestHelp.chm' Help file
Help.ShowPopup(this,"This is a Help pop-up",new Point(100,100));
Source Code: TestHelp.zip












No comments yet... Be the first to leave a reply!