Hey Guys,
I've got a cross thread invoke going on, and the invoke works fine, however I have found that all subsequent function calls need to be invoked aswell, otherwise it throws exceptions, how do I go about either modifiying my invoke command, or through some other solution, fix this?
This is my current invoker:
foreach (chat_window oc in open_chats)
{
if (oc.Name == friend)
{
string updmsg = msg.Substring(msg.IndexOf('\n')).Trim();
string[] argNames = new string[2];
argNames[0] = friend;
argNames[1] = updmsg;
Type t = oc.GetType();
t.InvokeMember("updateChat",
System.Reflection.BindingFlags.InvokeMethod, null, oc, argNames);
}
}
Thanks in advance, Psy