예제 #1
0
 private void cuadroDeActividadesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (f1 == null)
     {
         f1             = new Form1();
         f1.MdiParent   = this;
         f1.FormClosed += new FormClosedEventHandler(f1_FormClosed);
         f1.Show();
         if (fa != null)
         {
             fa.Close();
         }
         if (cf != null)
         {
             cf.Close();
         }
         if (d != null)
         {
             d.Close();
         }
         if (ac != null)
         {
             ac.Close();
         }
         if (acerca != null)
         {
             acerca.Close();
         }
     }
     else
     {
         f1.Activate();
     }
 }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form1 f1 = new Form1();

            f1.Activate();
            f1.Show();
        }
예제 #3
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Form1 form = new Form1();

            Thread ct = new Thread(

                new ThreadStart( // console thread
                    delegate()
            {
                while (true)
                {
                }
            }));

            ct.Start();  // Start console tråden

            form.Show();

            form.Activate();
            Application.Run(form);
            Environment.Exit(0);
        }