How display a help box when mouse hovers?

Hi all,

I'm making a little program and I wanted to add a small feature.

When you hover over buttons, or other various objects, after a few seconds a yellow text box opens up that tells what that object is. For example, if you hover and keep it still over the forward/back/reload buttons on your web browser it tells you what they do.

What is this called in c#

Thanks all,

Tim



Answer this question

How display a help box when mouse hovers?

  • Jeremy_Long

    That is called a ToolTip.  You would add one to your form in the designer, which will add a new pseudo--property to each control named "ToolTip on <ToolTip Name>".  Whatever text you assign to that property will be displayed in the ToolTip when the user hovers over that control.  You can also add a proper help box.  To do this you add a HelpProvider to your form, which again adds some new pseudo-properties to each control.  Whatever text you assign to the "HelpString on <HelpProvider Name>" property will be displayed whenever the user selects a control and presses F1 or clicks the Help button in the title bar and then clicks a control.  Generally speaking ToolTip text should be realtively short, while a HelpProvider can be used for a more detailed explanation.
  • How display a help box when mouse hovers?