C# F1 HelpProvider control to implement help for controls in a Windows Forms application

f1 helpprovider for controls HelpProvider has varies method to show F1 help in controls, simple text , chm file help , html help, webpage help. Snippets example shows effective method.

Chm file add to Resources and pass the file path as shown in example


Example Source Snippets - FormHelpProvider.zip

namespace : using System.Reflection

namespace : using System.IO

How to move form boder style none to any location ?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.IO;

namespace FormHelpProvider
    public partial class Form1 : Form
        public Form1()

        private void Form1_Load(object sender, EventArgs e)

        private void SetHelpProvider()
            //text mmessage help
            HelpProvider hlpTxt = new HelpProvider();
            hlpTxt.SetHelpString(textBox1, "View Help Msg");

            //chm help 
            HelpProvider hlpChmBtn = new HelpProvider();
            string path = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\Resources\\help.chm";
            hlpChmBtn.HelpNamespace = path;
            hlpChmBtn.SetShowHelp(button1, true);  

            //website help
            HelpProvider hlpWebBtn = new HelpProvider();
            hlpWebBtn.HelpNamespace = "http://smartsnipp.ecomparefiles.com/code_snippets_example.aspx";
            hlpWebBtn.SetShowHelp(button2, true);

            //html help
            HelpProvider hlpHtmlBtn = new HelpProvider();
            hlpHtmlBtn.HelpNamespace = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\Resources\\HelpPage.htm";
            hlpHtmlBtn.SetShowHelp(button3, true);    


smartsnipps.ecomparefiles.com © 2019, All Rights Reserved | Disclaimer: smartsnipps.eCompareFiles.com is free to use any code snippets without guarantee