Text files (*.
txt)|
File New
'Check if there's text added to the textbox
If [Link] Then
'If the text of notepad changed, the program will ask the user if they want to
save the changes
Dim ask As MsgBoxResult
ask = MsgBox("Do you want to save the changes", [Link], "New
Document")
If ask = [Link] Then
[Link]()
ElseIf ask = [Link] Then
ElseIf ask = [Link] Then
[Link]()
[Link]([Link], [Link],
False)
[Link]()
End If
'If textbox's text is still the same, notepad will open a new page:
Else
[Link]()
End If
File Open
'Check if there's text added to the textbox
If [Link] Then
'If the text of notepad changed, the program will ask the user if they want to
save the changes
Dim ask As MsgBoxResult
ask = MsgBox("Do you want to save the changes", [Link], "Open
Document")
If ask = [Link] Then
[Link]()
[Link] = [Link]([Link])
ElseIf ask = [Link] Then
ElseIf ask = [Link] Then
[Link]()
[Link]([Link], [Link],
False)
[Link]()
End If
Else
'If textbox's text is still the same, notepad will show the OpenFileDialog
[Link]()
Try
[Link] = [Link]([Link])
Catch ex As Exception
End Try
End If
File Save
[Link]()
' the application will check if the file is already exists, if exists, it will
ask the user if they want to replace it
If [Link]([Link]) Then
Dim ask As MsgBoxResult
ask = MsgBox("File already exists, would you like to replace it?",
[Link], "File Exists")
'if the user decides not to replace the existing file
If ask = [Link] Then
[Link]()
'if the user decides to replace the existing file
ElseIf ask = [Link] Then
[Link]([Link], [Link],
False)
End If
'if the file doesn't exist
Else
Try
[Link]([Link], [Link],
False)
Catch ex As Exception
End Try
End If
File Exit
End
Undo
'check if textbox can undo
If [Link] Then
[Link]()
Else
End If
Cut
[Link]()
If [Link] > 0 Then
[Link]([Link])
End If
[Link] = ""
Copy
[Link]()
If [Link] > 0 Then
[Link]([Link])
End If
Paste
If [Link] Then
[Link]()
End If
Select All
[Link]()
Find
Dim a As String
Dim b As String
a = InputBox("Enter text to be found")
b = InStr([Link], a)
If b Then
[Link]()
[Link] = b - 1
[Link] = Len(a)
Else
MsgBox("Text not found.")
End If
Format Font
[Link]()
[Link] = [Link]
Font Color
[Link]()
[Link] = [Link]
Align Left
[Link] = [Link]
[Link] = True
[Link] = False
[Link] = False
Center
[Link] = [Link]
[Link] = False
[Link] = True
[Link] = False
Right
[Link] = [Link]
[Link] = False
[Link] = False
[Link] = True
Background Color
[Link]()
[Link] = [Link]