Doevent与Backgroundworker合作 [英] Doevent work with backgroundworker

查看:64
本文介绍了Doevent与Backgroundworker合作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何长时间地与backgroundworker一起执行doevent之类的工作
直到我的程序没有挂起,并且其他控件可以在执行时间内处理

How i can do working like doevent with backgroundworker in a long loop
until my program doese not hang,and i can other controls handel in the excecution time
of loop?

推荐答案

作为经验法则,您不应使用DoEvents.
在大多数情况下,这是绝对的罪恶.

请查看我对类似问题的其他答案,我将在其中详细展示和说明使用BackgroundWorker:
—SA
You should not use DoEvents, as a rule of thumb.
In most cases, this is absolute evil.

Please see my other answer to a similar question where I show and explain using BackgroundWorker in detail: Changes step by step to show a control[^]. There are more recent answers to the similar topics. Please take a look and ask follow-up question if you need to.

(Important! Please, do not post it as an Answer. for follow-up, please use "Improve Question" or "Add Comment".)

—SA


这篇关于Doevent与Backgroundworker合作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆