Cross-Thread operation "Falls Back"
I have a program which monitors a TCP connection for any data and fires an event when an entire message has been recieved. The listener is on a different thread from the UI Thread. When the event is fired, if the message requires any UI changes, I invoke the Form with the current change. If this invoke is ever hit, the function in the listener that triggered off the Event flags up a Cross-Thread operation not valid error. I dont understand why the thread that called the event would flag up that error when i am trying to avoid that error by invoking. Example:

Without the Invoke on the command:

    if (cmd == "NEWID")
    {
        usr = new User(usr.Name, int.Parse(NW_Connector.GetWord(msg, 1)));
        this.Text = "Note It - " + usr.Name + "(" + usr.ID + ")"; //Cross-Thread Here
    }

Cross-Thread is flagged on the this.Text change.

When i add the Invoke:

    if (cmd == "NEWID")
    {
        usr = new User(usr.Name, int.Parse(NW_Connector.GetWord(msg, 1)));
        this.Invoke(new MethodInvoker(delegate { this.Text = "Note It - " + usr.Name + "(" + usr.ID + ")"; }));
    }

The Cross-Thread is flagged on the function that fired the event:

    if (NewMessage != null && NetworkConnectionState != ConnectionState.Closing)
        NewMessage(this, cl, data); //Cross-Thread Here

I dont understand why the Cross-thread is "moved" when invoking to the correct thread. Any help would be Fantastic!
Cross-Thread operation "Falls Back"
===

I have a program which monitors a TCP connection for any data and fires an event when an entire message has been recieved. The listener is on a different thread from the UI Thread. When the event is fired, if the message requires any UI changes, I invoke the Form with the current change. If this invoke is ever hit, the function in the listener that triggered off the Event flags up a Cross-Thread operation not valid error. I dont understand why the thread that called the event would flag up that error when i am trying to avoid that error by invoking. Example:

Without the Invoke on the command:

    if (cmd == "NEWID")
    {
        usr = new User(usr.Name, int.Parse(NW_Connector.GetWord(msg, 1)));
        this.Text = "Note It - " + usr.Name + "(" + usr.ID + ")"; //Cross-Thread Here
    }

Cross-Thread is flagged on the this.Text change.

When i add the Invoke:

    if (cmd == "NEWID")
    {
        usr = new User(usr.Name, int.Parse(NW_Connector.GetWord(msg, 1)));
        this.Invoke(new MethodInvoker(delegate { this.Text = "Note It - " + usr.Name + "(" + usr.ID + ")"; }));
    }

The Cross-Thread is flagged on the function that fired the event:

    if (NewMessage != null && NetworkConnectionState != ConnectionState.Closing)
        NewMessage(this, cl, data); //Cross-Thread Here

I dont understand why the Cross-thread is "moved" when invoking to the correct thread. Any help would be Fantastic!