请帮助多线程 [英] please help on multithreading

查看:72
本文介绍了请帮助多线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个使用多线程的严重问题。一个示例应用程序

显示我的问题可以在这里下载:
http://graphicsxp.free.fr/WindowsApplication11.zip


问题是我需要从
$调用控件上的操作b $ b委托,否则它不起作用。但是每次我完成

操作时,我必须更新进度条和progresslabel,但是这个

不能在委托中完成,因为它不起作用。 br />

在示例中我刚刚做了一个循环来增加进度条,但实际上

的进度条更新和操作

控件(tabcontro,datagrid ..)应该嵌套,因此问题!


请查看示例,以便更清楚地了解我在尝试什么

来实现。


感谢您的帮助:)

解决方案



http://msdn.microsoft.com/msdnmag/is...s/default.aspx


Ken

------------------

" Sam" < SA ************** @ voila.fr>在消息中写道

news:11 ********************** @ o13g2000cwo.googlegr oups.com ...


我有一个使用多线程的严重问题。可以在此处下载显示我的问题的示例应用程序:
http ://graphicsxp.free.fr/WindowsApplication11.zip

问题是我需要从
委托调用控件上的操作,否则它不起作用。但是每次我完成
操作时,我都必须更新进度条和progresslabel,但是这个
不能在委托中完成,因为它不起作用。

我刚刚做了一个循环来增加进度条,但实际上显然实际上进度条更新和
控件上的操作(tabcontro,datagrid ..)应该嵌套,因此问题!

请查看示例,以便更清楚地了解我正在尝试实现的目标。

感谢您的帮助:)


Ken,

感谢您的链接,但它几乎就是我已经做过的事情。请查看我的示例应用程序。

。你能告诉我你是否第一眼看到了什么'b $ b错了?

谢谢

你好,

我仍​​然在努力修复这个问题。有人看过我的

代码吗?

如果有人能发现我做错了,我会很感激。


问候


Hi,
I have a serious issue using multithreading. A sample application
showing my issue can be downloaded here:
http://graphicsxp.free.fr/WindowsApplication11.zip

The problem is that I need to call operations on Controls from a
delegate, otherwise it does not work. However each time I''ve done an
operation, I must update the progressbar and progresslabel, but this
cannot be done in the delegate as it does not work.

In the sample I''ve just done a loop to increase the progressbar, but
obviously in reality the progressbar updates and the operations on
controls (tabcontro, datagrid..) should be nested, hence the issue!

Please have a look at the sample for a clearer idea of what i''m trying
to achieve.

Thanks for your help:)

解决方案

Hi,

http://msdn.microsoft.com/msdnmag/is...s/default.aspx

Ken
------------------
"Sam" <sa**************@voila.fr> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...

Hi,
I have a serious issue using multithreading. A sample application
showing my issue can be downloaded here:
http://graphicsxp.free.fr/WindowsApplication11.zip

The problem is that I need to call operations on Controls from a
delegate, otherwise it does not work. However each time I''ve done an
operation, I must update the progressbar and progresslabel, but this
cannot be done in the delegate as it does not work.

In the sample I''ve just done a loop to increase the progressbar, but
obviously in reality the progressbar updates and the operations on
controls (tabcontro, datagrid..) should be nested, hence the issue!

Please have a look at the sample for a clearer idea of what i''m trying
to achieve.

Thanks for your help:)



Ken,
Thanks for the link but it''s pretty much what i do already. please have
a look at my sample application. Can you just tell me if you see what''s
wrong at first sight ?
thank you


Hello,
I am still struggling for fixing this one. Has someone looked at my
code?
I would be gratefull if someone could spot what I''m doing wrong.

Regards


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

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