Solved

Text Edit Control (Save and Save AS)

Posted on 2006-06-25
7
251 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
  • 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now