private
void
SetTextBox(
string
s)
... {
this.textBox1.Text += s;
}
delegate void SetText( string s);
private void Test()
... {
SetText Stxt = new SetText(SetTextBox);
for(int i=0;i<=100;i++)
...{
this.Invoke(Stxt, "内容:"+i.ToString());
}
}
private void button1_Click( object sender, EventArgs e)
... {
Sth = new Thread(new ThreadStart(Test));
Sth.Start();
}
... {
this.textBox1.Text += s;
}
delegate void SetText( string s);
private void Test()
... {
SetText Stxt = new SetText(SetTextBox);
for(int i=0;i<=100;i++)
...{
this.Invoke(Stxt, "内容:"+i.ToString());
}
}
private void button1_Click( object sender, EventArgs e)
... {
Sth = new Thread(new ThreadStart(Test));
Sth.Start();
}