It has the 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; } }
It works on my machine as is. The only way I worked "stop" was that I added a TextBox control to UserControl and handled its HelpRequest event.
public partial class UserControl1 : UserControl { public UserControl1() { InitializeComponent(); } private void textBox1_HelpRequested(object sender, HelpEventArgs hlpevent) {
So, my only suggestion at this point is to look at the child controls in UserControl and see if they interfere with the UserControl functions to trigger the event.
source share