private void _tick(ulong millSinceBeginning = 0) { if (isEnter) { if (pictBox.Location.Y >= 2) { pictBox.InvokeEx(f => pictBox.Location = new Point(2, pictBox.Location.Y - 1)); if (pictBox.Width >= _boxSize * 2 / 3) { pictBox.BeginInvoke(new MethodInvoker(() => pictBox.Size = new Size(pictBox.Width - 1, pictBox.Height - 1))); } } if (pnlActive.Width < Width) { pnlActive.InvokeEx(panel => pnlActive.Width = pnlActive.Width + _incWidth); } else { _timer.Stop(); } } else if (box.Text.Length < 1) { if (pictBox.Location.Y <= target) { pictBox.InvokeEx(pictureBox => pictBox.Location = new Point(2, pictBox.Location.Y + 1)); if (pictBox.Width <= _boxSize) { pictBox.InvokeEx(pictureBox => pictBox.Size = new Size(pictBox.Width + 1, pictBox.Height + 1)); } } else { pictBox.InvokeEx(pictureBox => pictBox.Location = new Point(2, target)); } if (pnlActive.Width > 0) { pnlActive.InvokeEx(panel => pnlActive.Width = pnlActive.Width - _incWidth); } else { _timer.Stop(); } } }