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 " Declare class level variables"
- Public applicationTitle As String = String.Empty
- Private workingPathFile As String = String.Empty
- ' NOTE: Additional code not shown.
- #End Region
- #Region " MainForm Events"
- ' Form loads and initialization performed.
- Private Sub MainForm_Load(sender As Object, e As EventArgs) _
- Handles MyBase.Load
- ' Set the title of the form.
- If My.Application.Info.Title <> String.Empty Then
- applicationTitle = My.Application.Info.Title
- Else
- applicationTitle = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
- End If
- Me.Text = applicationTitle
- ' Command Line processing of argument - filename.
- If My.Application.IsNetworkDeployed Then ' ClickOnce
- ' ClickOnce file association evoked program
- Dim args = AppDomain.CurrentDomain.SetupInformation.ActivationArguments
- If args.ActivationData IsNot Nothing Then
- If args.ActivationData.Count > 0 Then
- workingPathFile = args.ActivationData(0)
- If File.Exists(workingPathFile) Then
- GetFile()
- End If
- End If
- End If
- Else
- ' Traditional command line evoked with args
- If My.Application.CommandLineArgs.Count > 0 Then
- workingPathFile = My.Application.CommandLineArgs(0)
- If File.Exists(workingPathFile) Then
- GetFile()
- End If
- End If
- End If
- ' NOTE: Additional code not shown.
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment