UI控件 [英] UI controls

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

问题描述

嗨兄弟.
我有一些后台线程(2或3),如您所知,我们无法直接从后台线程访问UI控件.
那么如何才能异步操作UI控件(例如以异步方式移动控件)?
解决方案是什么?:confused:
请发布链接或代码段(明确的指导). ;)

Hi bros.
I have some background threads(2 or 3),as you know we can''t directly access the UI controls from background thread .
so how can I manipulate UI controls asynchronously(for example move controls in async manner)?
what''s the solution ?:confused:
please post a link or snippet code (clear guidance). ;)

推荐答案

这将为您提供帮助

http://www.codeproject.com /tips/67548/Changing-a-WinForms-Control-on-the-UI-Thread-from-.aspx [
this will helps you

http://www.codeproject.com/tips/67548/Changing-a-WinForms-Control-on-the-UI-Thread-from-.aspx[^]


:)


您可以使用后台工作线程并使用进度机制调用主线程,以使其能够执行UI工作.或者,您可以使用Invoke方法告诉UI控件移动.
http://weblogs.asp.net/justin_rogers/pages/126345.aspx [ ^ ]
You can use background worker threads and call the main thread using the progress mechanism, to make it do UI work. Or you can use the Invoke methods to tell the UI control to move.
http://weblogs.asp.net/justin_rogers/pages/126345.aspx[^]


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

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