Except doevent()
is another way that, in this infinite loop run another control in form.
I wanted to do it with backgroundworker, but I failed.
private voi开发者_Python百科d button1_Click(object sender, EventArgs e)
{
while (true)
{
Application.DoEvents(); //how i can use the backgrondworker in this place
}
}
The question and sample are confusing to me but what I think you are asking is how to use the BackgroundWorker class.
The Documentation for this class is pretty helpful and has sample code towards the bottom.
精彩评论