예제 #1
0
 public static void ShowForm()
 {
     if (splashForm.InvokeRequired)
     {
         ShowFormCallback d = new ShowFormCallback(ShowForm);
         splashForm.Invoke(d, new object[] { });
     }
     else
     {
         //splashForm = new FormWaiting();
         splashForm.Show();
         //Application.Run(splashForm);
     }
 }
예제 #2
0
        static public void ShowSplashScreen()
        {
            // Make sure it is only launched once.
            if (splashForm != null)
            {
                return;
            }
            else
            {
                splashForm = new FormWaiting();
                //PictureBox pictureBox1 = new PictureBox();
                //pictureBox1.Location = new Point(0,0);
                //splashForm.Controls.Add(pictureBox1);
                splashForm.InitializeComponent();

                splashForm.Show();
            }

            //Thread thread = new Thread(new ThreadStart(FormWaiting.ShowForm));
            //thread.IsBackground = true;
            //thread.SetApartmentState(ApartmentState.STA);
            //thread.Start();
        }