Thread: Open Save and Print (Windows Form)

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    75

    Question Open Save and Print (Windows Form)

    Hello, I want to create a word processor in C# that can open, save, and print.

    Here is my code:
    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace Word
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void openToolStripMenuItem_Click(object sender, EventArgs e)
            {
                openFileDialog1.ShowDialog();
            }
    
            private void saveToolStripMenuItem_Click(object sender, EventArgs e)
            {
                saveFileDialog1.ShowDialog();
            }
    
            private void pageSetupToolStripMenuItem_Click(object sender, EventArgs e)
            {
                pageSetupDialog1.ShowDialog();
            }
    
            private void printToolStripMenuItem_Click(object sender, EventArgs e)
            {
                printDialog1.ShowDialog();
                printDocument1.Print();
            }
    
        }
    }
    I have a rich text box called "document"
    I just started using C# yesterday so please be clear in your answers. (I have some experience in C++)

    Thanks

  2. #2
    Registered User AloneInTheDark's Avatar
    Join Date
    Feb 2008
    Posts
    74
    Just read the code examples for those components on msdn.microsoft.com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to print and save?
    By patron in forum C Programming
    Replies: 23
    Last Post: 03-16-2008, 10:56 AM
  2. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  3. dual boot Win XP, win 2000
    By Micko in forum Tech Board
    Replies: 6
    Last Post: 05-30-2005, 02:55 PM
  4. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM
  5. how to save or print
    By manson015 in forum C++ Programming
    Replies: 2
    Last Post: 02-11-2002, 01:18 PM