Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WinForm
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 New_Notepad
{
    public partial class Notepad : Form
    {
        public Notepad()
        {
            InitializeComponent();
        }
 
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            richTextBox1.Clear();
        }
 
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();
            dlg.Title = "Open";
            dlg.Filter = "Text Document(*.txt)*.txt|All Files(*.*)|*.*";
            dlg.ShowDialog();
            richTextBox1.LoadFile(dlg.FileName);
        }
 
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog dlg = new SaveFileDialog();
            
        }
 
        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Close();
        }
 
        private void cutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            richTextBox1.Cut();
 
        }
 
        private void copyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            richTextBox1.Copy();
        }
 
        private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            richTextBox1.Paste();
        }
 
        private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
        {
            richTextBox1.SelectAll();
        }
 
        private void wordWrapToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (richTextBox1.WordWrap == false)
                
        }
 
        
    }
}
 

 

 
I have learned to make web applications but dont know windows application..I want to learn windows application...I'm trying to create a notepad in windows application..Here is my code please correct this and tell me the proper code...And I'm using C# for making this..
Posted 25-Jul-11 19:52pm
Edited 25-Jul-11 21:02pm
Kim Togo26.1K
v3
Comments
SAKryukov at 26-Jul-11 0:59am
   
And what's the problem? How all this is related to Notepad? This is Windows application. It has nothing to do with TextBox or RichTextBox, so the formal answer would be "you cannot".
Please remove the tag "ASP.NET", add the tag "WinForms".
--SA
JOAT-MON at 26-Jul-11 1:51am
   
EDIT - added tags for code block
Saloni Jain at 23-Apr-14 0:47am
   
how could i add template in notepad in c# .net
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

NotePad using C# helps you to unnderstand NotePad coding.
  Permalink  
Comments
lucbinhdinh at 4-Nov-12 22:44pm
   
good
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Whatever you have done so far is quite ok. Carry on with that - if you run into any specific issues, post them here and someone should be able to help you.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

in this code atleast give the output of the code
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

I suggest taking a look at the code for the following notepad clone:
http://www.simplygoodcode.com/2012/04/notepad-clone-in-net-winforms.html[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 2 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100