当鼠标移到Button控件时自动提示
先添加ToopTip控件到Form窗体上,命名:btnStartUpToolTip
然后添加Button的MouseMove事件处理函数,如下:
private void btnStartUp_MouseMove(object sender, MouseEventArgs e)
{
if ( sender is Button )
{
Button btn=sender as Button;
this.btnStartUpToolTip.SetToolTip(btn, "启动");
}
}