C#RichTextBox帮助-如何在文本框中加载和保存并保存到.txt文件 [英] C# RichTextBox Help - How do you load and save to and from a textbox to a .txt file

查看:475
本文介绍了C#RichTextBox帮助-如何在文本框中加载和保存并保存到.txt文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我正在尝试制作一个程序,希望有一个带有richTextBox的窗口.我希望此文本框在程序目录中加载一个名为"details.txt"的文本文件.我希望它能够在Windows窗体打开时加载文本文件,并在关闭时保存.如果您可以提供帮助,将不胜感激.

谢谢,提前

Ok, I am trying to make a program and wish to have a window that has a richTextBox in it. I want this textbox to load a text file in the program directory called "details.txt". I want it to be able to load the text file when the windows form opens and save when it is shut. If you could help with this, it would be greatly appreciated.

Thankyou, in advance

推荐答案

尝试tis链接
RichTextBox.SaveFile方法 [ ^ ]
http://stackoverflow.com/questions/3743438/open-file- in-rich-text-box-with-c [ ^ ]
http://stackoverflow.com/questions/3751929/save-text- from-rich-text-box-with-c [ ^ ]
try tis link
RichTextBox.SaveFile Method[^]
http://stackoverflow.com/questions/3743438/open-file-in-rich-text-box-with-c[^]
http://stackoverflow.com/questions/3751929/save-text-from-rich-text-box-with-c[^]


这篇关于C#RichTextBox帮助-如何在文本框中加载和保存并保存到.txt文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆