HelpProvider
HelpProvider control provides popup or online help for a control. In this article, we will discuss how to use a HelpProvider control to implement help for controls in a Windows Forms application.
Here are some of the useful methods of HelpProvider.
SetShowHelp method specifies whether Help is displayed for the specified control.
SetHelpString method specifies the Help string associated with the specified control.
SetHelpNavigator method specifies the Help command to use when retrieving Help from the Help file for the specified control.
SetHelpKeyword method specifies the keyword used to retrieve Help when the user invokes Help for the specified control.
HelpNamspace property gets or sets a value specifying the name of the Help file associated with this HelpProvider.
Here is an example of how to use a HelpProvider component and load a help (.chm) file and apply on the controls.
C# Code:
private HelpProvider hlpProvider;
private void CreateHelpProvider()
{
hlpProvider = new System.Windows.Forms.HelpProvider();
hlpProvider.SetShowHelp(textBox1, true);
hlpProvider.SetHelpString(textBox1, "Enter a valid text here.");
hlpProvider.SetShowHelp(button1, true);
hlpProvider.SetHelpString(button1, "Click this button.");
// Help file
hlpProvider.HelpNamespace = "helpFile.chm";
hlpProvider.SetHelpNavigator(textBox1, HelpNavigator.TableOfContents);
}
VB.NET Code:
Private Sub CreateHelpProvider()
Dim hlpProvider As HelpProvider
hlpProvider = New System.Windows.Forms.HelpProvider()
hlpProvider.SetShowHelp(TextBox1, True)
hlpProvider.SetHelpString(TextBox1, "Enter a valid text here.")
hlpProvider.SetShowHelp(Button1, True)
hlpProvider.SetHelpString(Button1, "Click this button.")
' Help file
hlpProvider.HelpNamespace = "helpFile.chm"
hlpProvider.SetHelpNavigator(TextBox1, HelpNavigator.TableOfContents)
End Sub
Summary
In this article, we discussed discuss how to use a HelpProvider control.

shivaPosted Feb 28, 2013, 10:57 PM EST
i want sample project
Mahesh ChandTOP 10Posted Nov 22, 2011, 9:03 PM EST
Guys, please post all of your questions on the forums.
mohan kumarPosted Oct 18, 2011, 3:44 AM EDT
Can u just instruct me how to create a .chm help file...
ashwini padmaPosted Jan 19, 2011, 2:08 AM EST
it was nice but i want with an example
mohammad hassan mohammadiPosted Oct 5, 2010, 5:47 AM EDT
thank of your help and i want to be a active membershep of your site