Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6843905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:18:34+00:00 2026-05-27T00:18:34+00:00

How do I get a UserControl dispatch a HelpRequest event when clicked in HelpRequest-mode?

  • 0

How do I get a UserControl dispatch a HelpRequest event when clicked in “HelpRequest-mode”?

I’ve tried to setup the simplest UserControl with just some colored background. But can’t get it to work.

UPDATED

namespace SeoTools.UI.Components
{
    public partial class HelpRequestTest : UserControl
    {
        public HelpRequestTest()
        {
            InitializeComponent();
        }

        protected override void OnHelpRequested(HelpEventArgs hevent)
        {
            base.OnHelpRequested(hevent); //can't get it here either
        }
    }
}

namespace SeoTools.UI.Components
{
    partial class HelpRequestTest
    {
        /// <summary> 
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.SuspendLayout();
            // 
            // HelpRequestTest
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.SystemColors.ActiveCaption;
            this.Name = "HelpRequestTest";
            this.Size = new System.Drawing.Size(114, 94);
            this.ResumeLayout(false);

        }

        #endregion
    }
}

...

private void WebHelpRequested(object sender, HelpEventArgs hlpevent)
{
    string tag = ((Control)sender).Tag.ToString();
    if (!string.IsNullOrEmpty(tag))
    {
        try
        {
            ProcessStartInfo sInfo = new ProcessStartInfo(tag);
            Process.Start(sInfo);
        }
        catch (Exception) { }
    }
    hlpevent.Handled = true;
}

...

// 
// helpRequestTest1
// 
this.helpRequestTest1.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.helpRequestTest1.Location = new System.Drawing.Point(91, 3);
this.helpRequestTest1.Name = "helpRequestTest1";
this.helpRequestTest1.Size = new System.Drawing.Size(114, 94);
this.helpRequestTest1.TabIndex = 1;
this.helpRequestTest1.Tag = "http://offerta.se";
this.helpRequestTest1.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.WebHelpRequested);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:18:35+00:00Added an answer on May 27, 2026 at 12:18 am

    In it’s simplest form:

    public partial class UserControl1 : UserControl {
      public UserControl1() {
        InitializeComponent();
      }
    }
    
    public partial class Form1 : Form {
      public Form1() {
        InitializeComponent();
        userControl11.Tag = "http://www.stackoverflow.com";
        userControl11.HelpRequested += userControl11_HelpRequested;
      }
    
      private void userControl11_HelpRequested(object sender, HelpEventArgs hlpevent) {
        string tag = ((Control)sender).Tag.ToString();
        if (!string.IsNullOrEmpty(tag)) {
          try {
            ProcessStartInfo sInfo = new ProcessStartInfo(tag);
            Process.Start(sInfo);
          }
          catch (Exception) { }
        }
        hlpevent.Handled = true;
      }
    }
    

    This works on my machine “as is”. The only way I made it “stop” working was if I added a TextBox control to the UserControl, and handled it’s HelpRequest event.

    public partial class UserControl1 : UserControl {
      public UserControl1() {
        InitializeComponent();
      }
    
      private void textBox1_HelpRequested(object sender, HelpEventArgs hlpevent) {
        //This prevents the UserControl from firing it's help request:
      }
    }
    

    So my only suggestion at this point is to look at the child controls in your UserControl, and see if they are interfering with the UserControl’s ability to call the event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can edit this UserControl just fine in visual studio but I get this
Just trying to get my head round WPF. I have a usercontrol which I'm
I want to get the clicked event of a Button which is in my
I have an owner-drawn UserControl where I've implemented double-buffering. In order to get double-buffering
I have a custom control that inherits from UserControl , and I can't get
Sometimes my UserControl's Visible property does not get updated correctly. It happens at my
i have a usercontrol with two public properties public DateTime fromdate { get; set;
How to get the parent page values from the usercontrol. I have a usercontrol
I'm trying to get add a link to a DNN usercontrol where when the
I have a very simple UserControl as shown below. I'm trying to get the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.