您的位置:首页 > 其它

Solved this program:accessed from a thread other than the thread it was created on.

2007-08-02 16:55 661 查看
protected void myWatcher_Created(object sender, FileSystemEventArgs e)
{
string s = "ChangeType :: " + e.ChangeType.ToString() + "/nFullPath ::" + e.FullPath.ToString() + "/n/n";
AppendText(s);
}

private delegate void AppendTextHandler(string s);

private void AppendText(string s)
{
if( richTextBox1.InvokeRequired )
richTextBox1.Invoke(new AppendTextHandler(AppendText), new object[]{s});
else
richTextBox1.Text += s;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐