Click here to Skip to main content
Sign Up to vote bad
good
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 - 18:52
Edited 25 Jul '11 - 20:02
Kim Togo23.5K

Comments
SAKryukov - 26 Jul '11 - 0:59
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 - 26 Jul '11 - 1:51
EDIT - added tags for code block

5 solutions

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  
NotePad using C# helps you to unnderstand NotePad coding.
  Permalink  
Comments
lucbinhdinh - 4 Nov '12 - 22:44
good
in this code atleast give the output of the code
  Permalink  
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)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 464
1 Mahesh Bailwal 373
2 Maciej Los 215
3 CPallini 175
4 Rohan Leuva 175
0 Sergey Alexandrovich Kryukov 9,402
1 OriginalGriff 7,204
2 CPallini 3,933
3 Rohan Leuva 3,211
4 Maciej Los 2,743


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 2 Aug 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid