Solved

Text Edit Control (Save and Save AS)

Posted on 2006-06-25
7
265 Views
Last Modified: 2010-04-16
Just wondering if anyone has links to some good Text Edit source with Save and Save As functionality. Doesnt need to be extremely complex or anything Im actually just looking for save functionality and to see how its done.

Cheers
0
Comment
Question by:directxBOB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16987060
What?

Bob
0
 

Author Comment

by:directxBOB
ID: 16989022
Basic Text edit code written in C#

It doesnt have to be rich text, just once it saves what the user types in and has a save as function.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16995231
Are you looking for a TextBox control with Save and SaveAs capability?

Bob
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

Author Comment

by:directxBOB
ID: 17006355
Im looking to see how they save them. I have 99% of it already done, Im just having problems with my Temp Untitled Document. Much like when you open Word a Temp Untitled Document is created until you either save it or open another.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17008544
Help me out here!!  What kinds of problems are you having?  It is very difficult to help with vague descriptions--specific descriptions would help.

Bob
0
 

Author Comment

by:directxBOB
ID: 17028730
Im looking to see how they save the text typed into a box. Thats simply it, I know there are plenty of open source C# rich text documents out there. Where you type in a whole load of text and then click a save or a save as button. All I want to see is how they handle and manage the save / save as function.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17030595
public void Save(string fileName)
{
   this.richTextBox1.SaveFile(fileName, RichTextBoxStreamType.RichText)
}

public void SaveAs()
{
   SaveFileDialog dialog = new SaveFileDialog();
   dialog.AddExtension = true;
   dialog.CheckPathExists = true;
   dialog.DefaultExt = "txt";
   dialog.Filter = "Text file (*.txt)|*.txt";
   dialog.InitialDirectory = Application.StartupPath();
   dialog.OverwritePrompt = true;
   dialog.ShowHelp = false;
   dialog.Title = "Enter Save File Name";
   dialog.ValidateNames = true;
   if (dialog.ShowDialog() == DialogResult.OK)
      this.Save(dialog.FileName);
}

Bob
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question