private void button3_Click(object sender, EventArgs e)
        {
            this.label1.Text = "123kkk";
            //System.Threading.Thread.Sleep(0);
            
            
            MessageBox.Show(this.timer1.Enabled.ToString());

            var th = new System.Threading.Thread(ThreadStart);
            th.Start();
        }

        public void ThreadStart()
        {
            //for (int i = 0; i < 501000; i++)
                //this.Controls["label1"].Text = "123456";
            //textBox1.BeginInvoke(new Action(() => { textBox1.Text = "hello"; }));
            //for (int i = 0; i < 501000; i++)
                label1.BeginInvoke(new Action(() => { label1.Text = "hello"; }));
                label2.BeginInvoke(new Action(() => { label2.Text = ra.Next(1000).ToString(); }));
        }

  

相关文章:

  • 2021-06-13
  • 2022-12-23
  • 2021-11-28
  • 2021-04-24
  • 2022-12-23
猜你喜欢
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
相关资源
相似解决方案