1、设置边框的颜色和显示箭头图标:在构造函数里面设置

 public frmLogin()
        {
            InitializeComponent();

            //设置边框颜色
            this.toolTipMsg.Appearance.BorderColor = Color.Blue;
            //设置显示箭头图标
            this.toolTipMsg.ShowBeak = true;
        }

2、针对某一控件设置提示

调用ToolTip控件的ShowHint属性,常用有4个参数的重载

参数1:要设置的提示内容

参数2:标题

参数3:要设置显示提示的控件

参数4:提示内置的位置,枚举值。

this.toolTipMsg.ShowHint("用户名不能为空", "系统提示", this.txt_LoginName, ToolTipLocation.RightTop);

DEV提示控件ToolTipControl

3、设置显示的时间

3.1  在代码里面设置

//设置显示的时间(单位是毫秒)
toolTipMsg.AutoPopDelay = 2000;

3.2 设置属性

DEV提示控件ToolTipControl

 

相关文章:

  • 2021-09-29
  • 2021-09-14
  • 2021-09-30
  • 2022-02-11
  • 2021-08-31
  • 2021-10-19
  • 2022-01-22
  • 2021-11-22
猜你喜欢
  • 2021-04-25
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
  • 2022-02-07
  • 2022-01-28
  • 2022-02-28
相关资源
相似解决方案