C#鼠标放在控件上提示

 private void Form1_Load(object sender, EventArgs e)//窗体加载
        {
            ToolTip toolTip1 = new ToolTip();

            // Set up the delays for the ToolTip.
            toolTip1.AutoPopDelay = 5000;
            toolTip1.InitialDelay = 500;
            toolTip1.ReshowDelay = 500;
            // Force the ToolTip text to be displayed whether or not the form is active.
            toolTip1.ShowAlways = true;

            // Set up the ToolTip text for the Button and Checkbox.
            toolTip1.SetToolTip(this.btn_ReadSubClass, "My button1");//第一个参数为按钮控件名称
            toolTip1.SetToolTip(this.btn_WritSubClass, "My checkBox1");
        }

 

posted @ 2021-07-12 20:13  Cmale  阅读(317)  评论(0编辑  收藏  举报