コード例 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            FrmFlexLabelTest dialog = new FrmFlexLabelTest();

            Thread th = new Thread(new ThreadStart(dialog.Show));

            th.Start();

            Thread.Sleep(5000);

            dialog.Invoke(new ThreadStart(dialog.Close));
        }
コード例 #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            FrmFlexLabelTest dialog = new FrmFlexLabelTest();

            Thread th = new Thread(new ParameterizedThreadStart(this.Run));

            th.Start(dialog);

            Thread.Sleep(5000);

            dialog.Invoke(new ThreadStart(dialog.Close));
        }
コード例 #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            FrmFlexLabelTest dialog = new FrmFlexLabelTest();

            dialog.Show();
            //this.Enabled = false;
            //for (int i = 0; i < 100000; ++i)
            //{
            //    Console.WriteLine(i);
            //}
            //this.Enabled = true;
            Thread.Sleep(5000);
            //dialog.Close();
        }