/// <summary> /// Handles the Tick event of the timer control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void timer_Tick(object sender, EventArgs e) { Timer timer = (Timer)sender; AnimateMsgBox animate = (AnimateMsgBox)timer.Tag; if (DropDownForm.Height < animate.FormSize.Height) { DropDownForm.Height += animate.FormSize.Height / 20; if (DropDownForm.Height > animate.FormSize.Height) { DropDownForm.Height = animate.FormSize.Height; } DropDownForm.Invalidate(); } else { _timer.Stop(); _timer.Dispose(); } }