DEV提示控件ToolTipControl

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);

3、设置显示的时间

3.1  在代码里面设置

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

3.2 设置属性

原文地址:https://www.cnblogs.com/dotnet261010/p/6132883.html