Home > Basic Functions > ccc xc > Windows Applications > Windows Application Help Button
Windows Application Help Button
You can add a help button, icon or hyperlink to your Windows application that opens your help system. The instructions below assume that you're adding a help button to the main screen of your Windows application.
Follow the steps below to add a help button to your Visual Studio 2003/2005 Windows application.
1. Open your Visual Studio Windows application.
2. Double click the 'Button' control to add a button to the form. Change the 'text' property to 'Open Help System'. Drag the button to the desired position.
3. Double click the button control to open the code window.
4. Add the following code to the "Sub Button1_Click" event:
Open a Dynamic Help System
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Help.ShowHelp(Button1, "http://www.extremeease.com/help/helpconsole 2008") End Sub - or -
Open a Static Help System
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Help.ShowHelp(Button1, "help\default.htm") End Sub * the url above assumes that the help system is in a sub folder named 'help'
ShowHelp Syntax: Help.ShowHelp(Parent, URL) Parent - Name of the button control (Button1) URL - The url of the help system (http://www.extremeease.com/help/helpconsole 2008)
5. Press F5 to run the application. Click the 'Open Help System' button.
See also
|