Display a tooltip over a button using Windows Forms

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

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

9条回答
  •  情书的邮戳
    2020-11-29 18:13

    private void Form1_Load(object sender, System.EventArgs e)
    {
        ToolTip toolTip1 = new ToolTip();
        toolTip1.AutoPopDelay = 5000;
        toolTip1.InitialDelay = 1000;
        toolTip1.ReshowDelay = 500;
        toolTip1.ShowAlways = true;
        toolTip1.SetToolTip(this.button1, "My button1");
        toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
    }
    

提交回复
热议问题