SetHelpNavigator Method

HelpProvider.SetHelpNavigator Method

Specifies the Help command to use when retrieving Help from the Help file for the specified control.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual void SetHelpNavigator(
	Control ctl,
	HelpNavigator navigator
)

Parameters

ctl
Type: System.Windows.Forms.Control
A Control for which to set the Help keyword.
navigator
Type: System.Windows.Forms.HelpNavigator
One of the HelpNavigator values.

ExceptionCondition
InvalidEnumArgumentException

The value of navigator is not one of the HelpNavigator values.

The following code example demonstrates the use of the SetHelpNavigator method.

To run this example, place it in a form containing a HelpProvider named HelpProvider1 and a TextBox named TextBox1. The example requires the existence of a Help file named input.chm in the C:\Windows directory.



	//Declare the HelpProvider.
	internal System.Windows.Forms.HelpProvider HelpProvider1;


	private void InitializeHelpProvider()
	{
		// Construct the HelpProvider Object.
		this.HelpProvider1 = new System.Windows.Forms.HelpProvider();

		// Set the HelpNamespace property to the Help file for 
		// HelpProvider1.
		this.HelpProvider1.HelpNamespace = "c:\\windows\\input.chm";

		// Specify that the Help provider should open to the table
		// of contents of the Help file.
		this.HelpProvider1.SetHelpNavigator(TextBox1, 
			HelpNavigator.TableOfContents);
	}


.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2016 Microsoft