Easy TextEditor
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
1 post
Page 1 of 1
Here i am going to show you How to Make an Easy TextEditor.
What u need:
1xToolstrip with a "DropDownButton"
DropDownButton Text "&File"
Add 3Items in the DropDownButton
"&Open"
"&Save"
"Exit"
1xRichTextBox
1xOpenFileDialog
1xSaveFileDialog
Add a Import over your Public Class Form Code
What u need:
1xToolstrip with a "DropDownButton"
DropDownButton Text "&File"
Add 3Items in the DropDownButton
"&Open"
"&Save"
"Exit"
1xRichTextBox
1xOpenFileDialog
1xSaveFileDialog
Add a Import over your Public Class Form Code
Code: Select all
"&Open" Button Code
Imports System.IO
Code: Select all
"&Save" Button Code
OpenFileDialog1.ShowDialog()
If OpenFileDialog1.filename = "" Then
Else
RichTextBox1.text = My.Computer.FileSystem.ReadAllText(OpenFileDialog1.filename)
End If
Code: Select all
"Exit" Button Code
SaveFileDialog1.showdialog()
If SaveFileDialog1.filename = "" Then
Else
My.Computer.FileSystem.WriteAllText(SaveFileDialog1.filename, RichTextBox1.text, False)
End If
Code: Select all
Thats it!Me.Close()
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023