C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 02-23-2008, 09:39 AM   #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
MaGaIn is offline   Reply With Quote
Old 02-24-2008, 07:05 AM   #2
Registered User
 
AloneInTheDark's Avatar
 
Join Date: Feb 2008
Posts: 74
Just read the code examples for those components on msdn.microsoft.com
AloneInTheDark is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

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


All times are GMT -6. The time now is 09:07 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22