最小化形式问题 [英] minimize form problem

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

问题描述

大家好

我在C#中制作了项目
我用backgroundworker做一些工作需要一些时间
但是当我运行后台时,即使我什么也没做,
当我最小化程序时,它仍然可以正常工作,但是窗体停止工作无法以该窗体做任何事情"

所以有帮助吗?

hi every one

i made project in c#
and i used backgroundworker to do some work takes some time
but when i run background even if i do nothing else in the form
when i minimized the from the program still working but the form stop working "can''t do any thing in the form"

so any help??

推荐答案

听起来像是在forground线程中完成了工作,还是您试图在不使用Invoke的情况下与辅助线程中的gui对象进行交互?

您如何初始化线程?

问候
Espen Harlinn
Sounds like the work is being done in the forground thread, or are you trying to interact with gui objects from the worker thread without using Invoke?

How do you initialize the thread?

Regards
Espen Harlinn


您是说一旦最小化就无法取消最小化?

您是说某种进度指示器在最小化时不会被更新吗?

您是否正确更新了UI?
Do you mean that once minimized, you can''t un-minimize it?

Do you mean that some sort of progress indicator isn''t being updated when it''s minimized?

Are you updating the UI properly?


只需将代码放在启动BackGroundWorker的位置,然后将代码放入BackGroudWorker

我们都将尽力帮助您的伙伴..:)

我真的似乎UI线程忙于做某事,或者您的工作线程正在不使用invoke的情况下更新UI.

仔细查看您的代码.
just put your code where you start the BackGroundWorker and code in BackGroudWorker

We all will try our best to help you buddy.. :)

I really seems that UI thread is busy for doing something or your worker thread is updating UI without using invoke.

Look into your code carefully..


这篇关于最小化形式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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