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