1
我有一個登錄表單。該表格有2個文本框和3個按鈕。一個按鈕說「學生」。表單加載工具提示
我想要做的是在窗體打開時在此按鈕上顯示工具提示。我不想去按鈕,並將其懸停在它上面,以便它顯示。我想要加載表單,顯示工具提示,然後工具提示應該在5秒後消失。這是我迄今爲止所嘗試的:
private void Form1_Load(object sender, EventArgs e)
{
toolTip.IsBalloon = true;
toolTip.ToolTipIcon = ToolTipIcon.Info;
toolTip.ShowAlways = true;
toolTip.UseFading = true;
toolTip.UseAnimation = true;
toolTip.ToolTipTitle = "Student Mode";
toolTip.Show("You don't have to log in if you are a student. Just click here to go to the questions.", btnStudent);
}
您可以在窗體加載時啓動計時器。設置計時器滴答爲5000,在第一個滴答事件停止計時器和設置您的工具提示行爲像一個正常的工具提示。 – Brad 2013-02-28 18:02:14