static void Main(string[] args) { testForm tf = new testForm(); tf.Show(); while (tf.Visible == true) { Application.DoEvents(); System.Threading.Thread.Sleep(1); } }