方法一:
Control.CheckForIllegalCrossThreadCalls = false;
方法二:(推荐)
this.Invoke(new MethodInvoker(() =>
{
lstServer.Items.Add("Client:" + clientep.Address + "(" + clientep.Port + ")");
}));
方法一:
Control.CheckForIllegalCrossThreadCalls = false;
方法二:(推荐)
this.Invoke(new MethodInvoker(() =>
{
lstServer.Items.Add("Client:" + clientep.Address + "(" + clientep.Port + ")");
}));