我想提示文字在鼠标停顿的时候显示一下,然后就没了,怎么解决呀?

解决方案 »

  1.   

    ToolTip属性
    <a title=" tishi">ok</a>
      

  2.   

    // This example assumes that the Form_Load event handling method
    // is connected to the Load event of the form.
    private void Form1_Load(object sender, System.EventArgs e)
    {
       // Create the ToolTip and associate with the Form container.
       ToolTip toolTip1 = new ToolTip();   // Set up the delays for the ToolTip.
       toolTip1.AutoPopDelay = 5000;
       toolTip1.InitialDelay = 1000;
       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.button1, "My button1");
       toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
    }
      

  3.   

    toolTip1.AutoPopDelay = 5000;
    toolTip1.InitialDelay = 1000;
    toolTip1.ReshowDelay = 500;这个是正解
      

  4.   

    那就增加toolTip1.ReshowDelay 属性的值!
    MSDN有解释:
    AutomaticDelay:获取或设置工具提示的自动延迟。
    AutoPopDelay:获取或设置当指针在包含指定工具提示文本的控件内保持静止时,工具提示保持的时段.
    InitialDelay:获取或设置工具提示显示之前经过的时间。
    ReshowDelay:获取或设置鼠标指针从一个控件移到另一控件时,后面的“工具提示”窗口出现前必须经过多长时间。
      

  5.   

    查看MSDN中帮助
    ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpref/html/frlrfsystemwindowsformstooltipclasstopic.htm