从另一个线程更新ToolTipText [英] Updating ToolTipText from another thread

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

问题描述

你好.

我用来从另一个以标准方式运行的线程更新标签

Hi there.

I use to update labels from another thread running by the standard way

if (lblBloqueados.InvokeRequired)
            lblBloqueados.Invoke(new LabelDelegate(ABloqueados), new object[] { pMensaje });
         else
            lblBloqueados.Text = pMensaje;



现在,我正在尝试更新控件的ToolTipText,但是ToolTip控件没有InvokeRequired状态.所以我不知道怎么解决.

任何帮助.在此先感谢



Now I''m trying to update the ToolTipText of a control, but the ToolTip control doesn''t have the InvokeRequired status. So I don''t know how to solve it.

Any help. Thanks in advance

推荐答案

使用控件所在表单的Invoke函数.表单及其控件很可能是在同一线程上创建的.
Use the Invoke function of the form on which the control is. It''s very likely that the form and its controls were created on the same thread.


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

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