【发布时间】:2010-05-23 15:18:06
【问题描述】:
我正在尝试使用远程处理修改在服务器表单中找到的文本框 从客户端。我已经尝试了一些我找到的解决方案,但它们都不起作用。 远程处理部分正常工作,我唯一无法弄清楚的是:
这就是我所拥有的: 客户端:
...
private void btn_b1_Click(object sender, EventArgs e)
{
...
myFunc.update(string s);
...
}
...
共享库:
public interface myInterf
{
void update(string s);
}
服务器端:
我在同一个命名空间中有 2 个类
class class1 : MarshalByRefObject, myInterf
{
public void update(string s)
{
//what do i write here to modify textBox1?
}
}
public partial class class2 : Form
{
...
// here is the textBox i am trying to alter;
}
【问题讨论】: