Private void showHelp_Click(object sender, System.EventArgs e) Help::ShowHelp( this, helpfile, navigator, parameterTextBox->Text ) Navigator = *safe_cast(navigatorCombo->SelectedItem) If ( navigatorCombo->SelectedItem != nullptr ) HelpNavigator navigator = HelpNavigator::TableOfContents be passed in through the Parameter text box. values make use of an extra parameter, which can Display Help using the Help navigator enumeration void showHelp_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) See the Help class overview for the complete code example. This example shows only the call to the ShowHelp method. Static void ShowHelp(System::Windows::Forms::Control ^ parent, System::String ^ url, System::Windows::Forms::HelpNavigator command, System::Object ^ parameter) public static void ShowHelp ( parent, string url, command, object param) public static void ShowHelp ( parent, string url, command, object parameter) public static void ShowHelp (? parent, string? url, command, object? parameter) static member ShowHelp : * string * * obj -> unit static member ShowHelp : * string * * obj -> unit Public Shared Sub ShowHelp (parent As Control, url As String, command As HelpNavigator, param As Object) Public Shared Sub ShowHelp (parent As Control, url As String, command As HelpNavigator, parameter As Object) Parameters Static void ShowHelp(System::Windows::Forms::Control ^ parent, System::String ^ url, System::Windows::Forms::HelpNavigator command, System::Object ^ param) public: See alsoĭisplays the contents of the Help file located at the URL supplied by the user. You can use the following values for the navigator argument: HelpNavigator.TableOfContents, HelpNavigator.Find, HelpNavigator.Index, or HelpNavigator.Topic. Help.ShowHelp(TextBox1, "file://c:\charmap.chm", HelpNavigator.Index)Ĭompiled Help files provide table of contents, index, search, and keyword links in pages. Private Sub Button2_Click(ByVal sender As System.Object, _īyVal e As System.EventArgs) Handles Button2.Click ' Open the Help file for the Character Map topic and Help.ShowHelp(TextBox1, "file://c:\\charmap.chm", Private void Button2_Click(System.Object sender, System.EventArgs e) Open the Help file for the Character Map topic and Help::ShowHelp( TextBox1, "file://c:\\charmap.chm", HelpNavigator::Index ) Void Button2_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ ) To run this example, paste the following code into a form that contains a button named Button2. The following code example demonstrates how to use the ShowHelp method to open a Help file to its index page. If keyword is null, the table of contents for the Help file will be displayed. For information on the format of paths, see File path formats on Windows systems. The url argument can be of the form C:\path\sample.chm or /folder/file.htm. Help.ShowHelp(Me, helpfile, keyword.Text) ' Display Help using the provided keyword. Private Sub showKeyword_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles showKeyword.Click Help.ShowHelp(this, helpfile, keyword.Text) Private void showKeyword_Click(object sender, System.EventArgs e) Help::ShowHelp( this, helpfile, keyword->Text ) Display help using the provided keyword. void showKeyword_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) To show the "To paint with a brush" Help topic by the keyword, type mspaint.chm::/paint_brush.htm in the Keyword text box, and then click the Show Keyword button. The Show Keyword button displays content in the Help file based on the keyword that is specified in the Keyword text box.įor example, to show the Ovals Help page by the index value, select the HelpNavigator.KeywordIndex value in the Help Navigator drop-down list, type ovals in the Parameter text box, and then click the Show Help button. The Show Help button displays content in the Help file based on the value that is selected in the Help Navigator list. The Show Help Index button displays the Index tab for the Help file. The following code example displays a form with three buttons that can be used to interact with the mspaint.chm Help file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |