本文介绍了NET框架的所见即所得进度环(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Application.DoEvents();语句立即显示进度圈,但在长时间运行任务时不会旋转.
请帮忙,我不知道我在做什么错.
我的示例代码:

Application.DoEvents(); statement shows the Progress circle immediately but it does not spin while long task is running.
Please help, I can''t figure out what I am doing wrong.
My sample code:

private void btnFindFileAndLoad_Click(object sender, EventArgs e)
{
    this.progressCircle1.Visible = true;
    this.progressCircle1.Rotate = true;
    Application.DoEvents();  //process message queue
    LoadMyFile(str_FileDirectory_and_FileName);  //runs for 20sec

    this.progressCircle1.Visible = false;
    this.progressCircle1.Rotate = false;
}

推荐答案


这篇关于NET框架的所见即所得进度环(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 07:40
查看更多