Works Perfectly...
My final code:
Load Sub:
Code:Dim file = My.Application.CommandLineArgs(0) Try If Not file = "" Then Me.rtxtResult.LoadFile(file, RichTextBoxStreamType.PlainText) 'Dim objreader As New IO.StreamReader(file) 'rtxtResult.Text = objreader.ReadToEnd() 'objreader.Close() End If Catch ex As Exception MessageBox.Show(String.Format("Error while attempting to load file {0}file = {1}{0}{0}{2}", _ Environment.NewLine, file, ex.Message)) End Try
I also replaced streamreader (as advised) with this:
Code:Me.rtxtResult.LoadFile(LoadFileLocation, RichTextBoxStreamType.PlainText)
Thanks a lot everyone who contributed to helping me to fix this issue...




Reply With Quote