日期:2014-05-19  浏览次数:20718 次

如果保存richtext中text的内容成日志文件
我想实现的是,在每次应用系统关闭后,自动把richtext中记录的文字保存成一个日志文件,还有就是如果捕获系统关闭的事件,求助.

------解决方案--------------------
this.FormClosing += new FormClosingEventHandler(FormClosing);


void FormBaggageSetting_FormClosing(object sender, FormClosingEventArgs e)
{
richtextBox1.SaveFile(filename);
}