private void timer_Tick(Object myObject, EventArgs myEventArgs)
{
if (this.Top >= (ypos-5) && wait > 0) // waiting
{
wait--;
}
else if ((this.Top >= (ypos - this.Height)) && wait <= 0 && !mousehover()) // going up
{
this.Top -= 5;
wait--;
if (this.Top <= (ypos - this.Height) && wait <= 0)
{
this.Close();
}
}
else if (this.Top < ypos && wait > 0) //going down
{
this.Top += 5;
}
if (wait < -100)
{
this.Close();
}
}