private void SendMSG() { Connection.Connection.SendData("CHAT;" + MessageTXT.Text); MessageTXT.Clear(); MessageTXT.SelectionStart = MessageTXT.TextLength; MessageTXT.Focus(); }
public void AddMessage(string Message) { if (this.InvokeRequired) { this.Invoke(new Action <string>(AddMessage), Message); return; } ChatAreaRTB.Text = ChatAreaRTB.Text + "\n" + Message; ChatAreaRTB.SelectionStart = ChatAreaRTB.TextLength; ChatAreaRTB.ScrollToCaret(); ChatAreaRTB.Focus(); MessageTXT.SelectionStart = MessageTXT.TextLength; MessageTXT.Focus(); }