English 中文(简体)
无限休息室背景工作者
原标题:backgroundworker in infinite loop
  • 时间:2011-02-02 00:09:48
  •  标签:
  • doevents

doevent()外,另一种方式是,在这种无限循环中,另一种形式控制。

我希望与背景工作者一起这样做,但我失败了。

    private void 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 for this category is pretty help and has samples Code towards the Worst.





相关问题
无限休息室背景工作者

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 void button1_Click(object sender, ...

What does "DoEvents" do in vb6?

What does "DoEvents" do in vb6 ? Why do I get the error message "Out of stack space" ? What does it mean ?

When do I know to call DoEvents?

If I m looping through a prolonged operation (say, processing files) and I want to update a progress bar, I need to use DoEvents, from what I can understand. But calling it during every loop of the ...

Calling DoEvents in Application.Idle

I stay away from Application.DoEvents, since there is the issue of re-entrancy and there is always another way to avoid holding up the UI. I ve long prefered to do background work in the Application....

Is Application.DoEvents() my only choice (in this case)?

I have some commercial equipment that I can connect to with a .Net library supplied by the equipment manufacturer - so I have no control over the library or the equipment, only my code. The ...

Custom Modal Window in WPF?

I have a WPF application where I d like to create a custom pop-up that has modal behavior. I ve been able to hack up a solution using an equivalent to DoEvents , but is there a better way to do this?...

Windows Forms Click event repeating itself

I have a strange problem with a Windows Forms event. To be exact, it s a KryptonHeaderGroup s ButtonSpec Click event, but it also happens with a plain vanilla System.Windows.Forms.Button. In the ...

热门标签