Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7724509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:42:27+00:00 2026-06-01T04:42:27+00:00

From here I have seen it suggested that an instance of RichTextBox be created

  • 0

From here I have seen it suggested that an instance of RichTextBox be created and then it’s SaveFile(string path) method be used to get the file onto the hard drive:

RichTextBox rtb = new RichTextBox();

rtb.SaveFile(@"\MyFileName.rtf");

It works, but,….. is this how it should be done, I ask as it seems a little hackish? If not, then what is the correct way of doing this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:42:28+00:00Added an answer on June 1, 2026 at 4:42 am

    The MSDN documentation says that’s exactly how you are supposed to do it.

    They also have the following example here:

    public void SaveMyFile()
    {
       // Create a SaveFileDialog to request a path and file name to save to.
       SaveFileDialog saveFile1 = new SaveFileDialog();
    
       // Initialize the SaveFileDialog to specify the RTF extension for the file.
       saveFile1.DefaultExt = "*.rtf";
       saveFile1.Filter = "RTF Files|*.rtf";
    
       // Determine if the user selected a file name from the saveFileDialog.
       if(saveFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK &&
          saveFile1.FileName.Length > 0) 
       {
          // Save the contents of the RichTextBox into the file.
          richTextBox1.SaveFile(saveFile1.FileName, RichTextBoxStreamType.PlainText);
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen a method somewhere here on SO to restrict items returned from
I have hourly weather data. I've seen the function examples from here: http://casoilresource.lawr.ucdavis.edu/drupal/node/991 I'm
I have heard that DateTime.Now is very expensive call (from here ) Is GETDATE()
I have just downloaded SQL Server 2005 express edition from here: To be used
I currently have a csv file that I'm parsing with an example from here:
I have seen an interview question from Bloomberg from here: http://www.careercup.com/question?id=383154 extern void print(int
I have got the following code from here to read an Excel file using
I have installed StyleCop CheckIn policy (from here ) and it works great. However
I have been following the validation for Entry boxes from here . The code
I have a script for dynamic javascript date picker, taken from here . Please

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.