public delegate void HandlerLableText(string msg);
void RichTexLableText(string msg)
{
if (this.InvokeRequired)
{
HandlerLableText objRichTextAppendText = new HandlerLableText(RichTexLableText);
IAsyncResult result = this.BeginInvoke(objRichTextAppendText, new object[] { msg });
if (result.CompletedSynchronously)
{
objRichTextAppendText.EndInvoke(result);
}
}
else
{
this.richTextBox1.AppendText(msg);
this.richTextBox1.AppendText("
");
}
}