Helperprovider provides control pop-up or online help

Source: Internet
Author: User

Helperprovider is a built-in control in the. NET Framework class library. It can provide pop-up or online help for controls. To associate a specific help string with a control, use the sethelpstring Method for pop-up. to associate a Help file with helpprovider, set the helpnamespace attribute to enable online help. At the same time, the helpnamespace online help and sethelpstring pop-up help are set. The helpnamespace help information is given priority.

Take a simple example:

I. Implementation pop-up help

 

1. Create a new window and set the basic attributes:
Helpbutton = true
Maximizebox = false
Minimizebox = false
This is not necessary, just to display the question mark in the upper right corner.

2. Compile the backgroundCode

Helpprovider HP;
Public Frm13helpprovider ()
{
Initializecomponent ();
// Instantiate helpprovider
HP =   New Helpprovider ();
}

Private   Void Frm13helpprovider_load ( Object Sender, eventargs E)
{
// Set the display information for the help of the control
HP. sethelpstring (button1, " This is a button " );
HP. sethelpstring (monthcalendar1, " This is a calendar Control " );
}

3. Press the F1 key during running, or click the question in the upper right corner to pop up the help information.

 

Ii. Online Help
 

1. Prepare online help documents, including CHM and HTML documents.
2. Compile the background code. The help file here is a web page creation manual, which must be prepared using tools in actual development.

// Set the pop-up help document by pressing F1
// It can be an HTML, CHM file, or a URL.
HP. helpnamespace =   " Help. CHM " ;

Press the F1 key to view the online help.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.