螺纹锁定其他按钮. [英] Thread locking out other buttons.

查看:101
本文介绍了螺纹锁定其他按钮.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我.

为什么当我在代码中运行线程然后又被锁定另一个控件时?

例如,当我在运行线程1的按钮1上单击时,其后将按钮2锁定.


谢谢.

[edit]已将问题标题更改为有意义的描述.请不要使用请帮助我"或类似名称,因为它不会告诉潜在的答复者您的问题是什么,如果他们(在这种情况下)对线程一无所知,那会浪费时间.如果您使用更具描述性的标题,您将获得重点突出的回复. Griff [/edit]

please help me.

why when me run a thread inside my code Then Are locked another controls my form

For example when i click on button1 for run thread1 Thereafter are locked button2.


Thank you.

[edit]Changed question title to meaningful description. Please do not use "please help me" or similar as it does not tell potential answerers what your problem is - that wastes time if they (in this case) know nothing about threading. If you use a more descriptive title, you will get better focussed responses. Griff[/edit]

推荐答案

您必须向我们展示一些代码(要做到这一点,只需编辑原始帖子,不添加答案). br/>
您正在运行BackgroundWorker,还是正在使用System.Threading.Thread对象?如果它是Thread对象,我的猜测是您使用了Thread.Join()方法.

如果编码正确,那么您应该不会遇到问题...但是,除非您发布代码,否则我们将无济于事.
You would have to show us some code (and to do that, just edit the original post, do not add an answer).

Are you running a BackgroundWorker, or are you using the System.Threading.Thread object? If it''s the Thread object, my guess would be that you used the Thread.Join() method.

If it''s coded right, you shouldn''t have that problem...but again, we can''t help you unless you post the code.


这篇关于螺纹锁定其他按钮.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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