Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '------------------------------------------------------------------------------------------
- ' Notice of My Copyright and Intellectual Property Rights
- '
- ' Any intellectual property contained within the program by Joseph L. Bolen remains the
- ' intellectual property of the Joseph L. Bolen. This means that no person may distribute,
- ' publish or provide such intellectual property to any other person or entity for any
- ' reason, commercial or otherwise, without the express written permission of Joseph L. Bolen.
- '
- ' Copyright © 2015. All rights reserved.
- ' All trademarks remain the property of their respective owners.
- '-------------------------------------------------------------------------------------------
- ' Program Name: Text Editor
- '
- ' Author: Joseph L. Bolen
- ' Date Created: Feb 2015
- '
- ' Description: Simple plain text editor program with printing ability.
- '
- ' Documentation is at:
- ' App's screen image is at: http://imgur.com/TzWs9kO
- ' App's screen design time specs at: http://pastebin.com/bhinRQ5d
- ' App's Visual Basic .NET Event Procedures & TODO's is at
- ' http://pastebin.com/UZ4tcEpE
- ' App's Visual Basic .NET code is at http://pastebin.com/u/jaybeeoh
- ' Video tutorial at YouTube: http://www.youtube.com/user/bolenpresents
- '-------------------------------------------------------------------------------------------
- #Region " Set Menu Options"
- ' Using the timer click event, enable or disable menuItems and toolStripButtons.
- Private Sub Timer1_Tick(sender As Object, e As EventArgs) _
- Handles Timer1.Tick
- ' In design time, timer1 was set to ...
- ' Enable = True
- ' Interval = 1500 (or 1.5 seconds).
- If MyTextBox.CanUndo Then
- UndoToolStripMenuItem.Enabled = True
- Else
- UndoToolStripMenuItem.Enabled = False
- End If
- If MyTextBox.SelectionLength > 0 Then
- CutToolStripMenuItem.Enabled = True
- CutToolStripButton.Enabled = True
- CopyToolStripMenuItem.Enabled = True
- CopyToolStripButton.Enabled = True
- DeleteToolStripMenuItem.Enabled = True
- Else
- CutToolStripMenuItem.Enabled = False
- CutToolStripButton.Enabled = False
- CopyToolStripMenuItem.Enabled = False
- CopyToolStripButton.Enabled = False
- DeleteToolStripMenuItem.Enabled = False
- End If
- If String.IsNullOrWhiteSpace(MyTextBox.Text) Then
- SaveToolStripMenuItem.Enabled = False
- SaveAsToolStripMenuItem.Enabled = False
- SaveToolStripButton.Enabled = False
- PrintToolStripMenuItem.Enabled = False
- PrintToolStripButton.Enabled = False
- PrintPreviewToolStripMenuItem.Enabled = False
- FindToolStripMenuItem.Enabled = False
- FindNextToolStripMenuItem.Enabled = False
- ReplaceToolStripMenuItem.Enabled = False
- SelectAllToolStripMenuItem.Enabled = False
- Else
- If MyTextBox.Modified = True Then
- SaveToolStripMenuItem.Enabled = True
- SaveToolStripButton.Enabled = True
- End If
- SaveAsToolStripMenuItem.Enabled = True
- PrintToolStripMenuItem.Enabled = True
- PrintToolStripButton.Enabled = True
- PrintPreviewToolStripMenuItem.Enabled = True
- FindToolStripMenuItem.Enabled = True
- ReplaceToolStripMenuItem.Enabled = True
- If findString <> String.Empty Then
- FindNextToolStripMenuItem.Enabled = True
- Else
- FindNextToolStripMenuItem.Enabled = False
- End If
- SelectAllToolStripMenuItem.Enabled = True
- End If
- End Sub
- #End Region
Advertisement
Add Comment
Please, Sign In to add comment