Display a tooltip over a button using Windows Forms

后端 未结 9 1829
梦谈多话
梦谈多话 2020-11-29 17:37

How can I display a tooltip over a button using Windows Forms?

9条回答
  •  鱼传尺愫
    2020-11-29 18:25

    The .NET framework provides a ToolTip class. Add one of those to your form and then on the MouseHover event for each item you would like a tooltip for, do something like the following:

    private void checkBox1_MouseHover(object sender, EventArgs e)
    {
        toolTip1.Show("text", checkBox1);
    }
    

提交回复
热议问题