0% found this document useful (0 votes)
15 views5 pages

Text Editor Functionality in VB.NET

This document contains code for a text editor application with the following functions: copy, paste, cut, save, open, new file, exit, select all, font style, text alignment, font color, background color, undo, redo, and about. The code implements event handlers for menu items and dialog boxes to perform each function.

Uploaded by

Generose Camu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

Text Editor Functionality in VB.NET

This document contains code for a text editor application with the following functions: copy, paste, cut, save, open, new file, exit, select all, font style, text alignment, font color, background color, undo, redo, and about. The code implements event handlers for menu items and dialog boxes to perform each function.

Uploaded by

Generose Camu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Public Class Form1

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles [Link]

End Sub

'code to copy the text


Private Sub CopyToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
[Link]([Link])
End Sub

'code to paste the selected text


Private Sub PasteToolStripMenuItem_Click(sender As Object, e As EventArgs)
Handles [Link]
[Link] = [Link]
End Sub

'code to cut the selected text and the text is copied from the clipboard
Private Sub CutToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
[Link]([Link])
[Link] = ""
End Sub

'code to save the existing file


Private Sub SaveToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
[Link]()
[Link]([Link], [Link], False)
End Sub

'code to open the existing file


Private Sub OpenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
If [Link] <> 0 Then
If MsgBox("Do you want to save changes to Untitled?", [Link]) = 6
Then
[Link]()
[Link]([Link], [Link], False)

End If
End If
End Sub

'code to open new file


Private Sub NewToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
If [Link] <> 0 Then
If MsgBox("Do you want to save changes to Untitled?", [Link]) = 6
Then
[Link]()
[Link]([Link], [Link], False)

End If
End If
[Link]()
End Sub

'code to exit the application


Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
If [Link] <> 0 Then
If MsgBox("Do you want to save changes to Untitled?", [Link]) = 7
Then
[Link]()
[Link]([Link], [Link], False)

End If
End If
[Link]()
End Sub

'code to select all the text


Private Sub SelectAllToolStripMenuItem_Click(sender As Object, e As EventArgs)
Handles [Link]
[Link]()
End Sub

'code to set the font style


Private Sub FontToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
[Link]()
[Link] = [Link]
End Sub

'code for left alignment


Private Sub LeftToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
[Link] = [Link]
End Sub

'code for center/justify alignment


Private Sub CenterToolStripMenuItem_Click(sender As Object, e As EventArgs)
Handles [Link]
[Link] = [Link]
End Sub

'code for right alignment


Private Sub RightToolStripMenuItem_Click(sender As Object, e As EventArgs)
Handles [Link]
[Link] = [Link]
End Sub

'code to set the font color


Private Sub FontColorToolStripMenuItem_Click(sender As Object, e As EventArgs)
Handles [Link]
[Link]()
[Link] = [Link]
End Sub

'code to set the background color


Private Sub BackColorToolStripMenuItem_Click(sender As Object, e As EventArgs)
Handles [Link]
[Link]()
[Link] = [Link]
End Sub

'code to undo
Private Sub UndoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
[Link]()
End Sub

'code to redo
Private Sub RedoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles
[Link]
[Link]()
End Sub

'code to show about


Private Sub AboutToolStripMenuItem_Click(sender As Object, e As EventArgs)
Handles [Link]
[Link]()
End Sub

'code for Ok
Private Sub dlgOpen_FileOk(sender As Object, e As
[Link]) Handles [Link]

End Sub
End Class
PROJECT
IN
TVE
Submitted By:
CAMU, Patricia E.
ROXAS, Hannah Clarisse B.
BEARNEZA, Daianne
REYES, Jerald

Submitted To:
Mrs. Karen Grace M. Sapitula

You might also like