private void ShowQueueForm() { // if queueForm is never been showed or is closed, generate it again if (queueForm == null || queueForm.IsDisposed) { queueForm = new QueueForm(this); } queueForm.Show(); if (queueForm.WindowState == FormWindowState.Minimized) { queueForm.WindowState = queueForm.GetLastWindowState(); } queueForm.BringToFront(); System.Windows.Forms.Application.DoEvents(); }