CallbackService可以更改表格吗? [英] Can CallbackService change a Form?

查看:67
本文介绍了CallbackService可以更改表格吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在WCF上的CallbackService遇到问题.我想通过回调操作更改列表框,但是callbackservice无法使用任何形式.是否可以从callbackservice更改某些形式?我完全想在列表框中输入文本.

I have a problem with a CallbackService on WCF. I want to change a listbox from callback action, but any form isn''t available from callbackservice. Is it possible to change some forms from callbackservice? I exactly want to put text in the listbox.

推荐答案

您的CallbackService类应采用一种形式作为构造函数参数,并将其存储在字段中,以便在回调中使用方法.不要忘记使用Begin/EndInvoke(或者如果简短的话,只需使用Invoke)来更新UI控件,因为我希望在不同的线程中调用该回调.
Your CallbackService class should take a form as a constructor parameter and store that in a field so it is available in callback methods. Don''t forget to use Begin/EndInvoke (or just Invoke if it''s for short things) for updating UI controls, as I would expect that that callback is called in a different thread.


我使用会议软件,但我刚刚发现该程序也可以进行回调.
如果有帮助,请访问以下链接:
Hi i work with a conference software but i just found out the program can do callback too.
If it helps, th link is here: Link[^]

If not, sorry to interrupt.


这篇关于CallbackService可以更改表格吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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