Visual basic notepad1/27/2024 ![]() Here I have used StreamReader class to read the data present with in the specified file. Ll.Text = "Write information about the company" create a form dynamically which displays the information about the company. Private void aboutUsToolStripMenuItem_Click( object sender, EventArgs e) TxtContent.ForeColor = colorDialog1.Color Private void colorToolStripMenuItem_Click( object sender, EventArgs e) Private void fontToolStripMenuItem_Click( object sender, EventArgs e) Private void selectAllToolStripMenuItem_Click( object sender, EventArgs e) Private void pasteToolStripMenuItem_Click( object sender, EventArgs e) Private void copyToolStripMenuItem_Click( object sender, EventArgs e) Private void cutToolStripMenuItem_Click( object sender, EventArgs e) Private void exitToolStripMenuItem_Click( object sender, EventArgs e) Private void printToolStripMenuItem_Click( object sender, EventArgs e) StreamWriter sw = new StreamWriter (fName) Private void saveToolStripMenuItem_Click( object sender, EventArgs e) StreamReader sr = new StreamReader (fName) Read the data by using StreamReader class Read the filename selected by the user with in open file dialog box. ![]() Private void openToolStripMenuItem_Click( object sender, EventArgs e) Private void newToolStripMenuItem_Click( object sender, EventArgs e) Private void Form1_Load( object sender, EventArgs e) So to add the above controls, Go to the tool box and add accordingly the controls as mentioned. MenuStrip control : This is used here to add different menu items.ColorDialog control : This control is used here to print a color dialog box.FontDialog control : This control is used here to print a font dialog box.PrintDialog control : This control is used here to print a print dialog box.SaveFileDialog control : This control is used here to print a file dialog box.OpenFileDialog control : This control is used here to print an open dialog box.To work with the above applicaion, 7 controls are required that is Set the textbox property as : Name = txtContent, Dock = Fill and Multiline = true. Under Edit menu: Cut, Copy, Paste, SelectAll. Under File menu: New, Open, Save, Print, Exit. In my application, I have added File, Edit, Format, Help menus in a menu control. To create a simple notepad application, create a new project with a name NotepadApp and design the window as shown below.Īccording to your requirement, you can add the submenus in a menu as shown in the above image. A menubar is a collection of menu's and a menu is a collection of menu items. To create a notepad application, the primary requirements are to place a MenuBar control and a textbox control. IntroductionThis is a simple window application, which explains how to create a Notepad application.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |