I am using my encryption class from MSDN which has worked so far until this point. The code is below and I either get an error where the DecodeText() part is right now or if I put it in the other areas for the file name, I get no errors but the progress bar doesn't move (line 5 or line 27). Any ideas?
vb Code:
  1. Imports Cryptography.clsCrypto
  2.  
  3. Public Class frmSQLExecuteProgress
  4.     'specify the location of the dbu file
  5.     Dim strFileLocation As String = My.Application.Info.DirectoryPath & "\sql\sql.dbu"
  6.  
  7.     Private Sub frmSQLExecuteProgress_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  8.         'form layout
  9.         FormLayout(Me)
  10.  
  11.         'start the timer
  12.         With tmrProgBar
  13.             .Enabled = True
  14.             .Interval = 7000
  15.             .Start()
  16.         End With
  17.     End Sub
  18.  
  19.     Private Sub cmdDone_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDone.Click
  20.         'when the done button is clicked on, close the form
  21.         Me.Close()
  22.     End Sub
  23.  
  24.     Private Sub tmrProgBar_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrProgBar.Tick
  25.         With (My.Computer.FileSystem)
  26.             'lets see if the file exists
  27.             If System.IO.File.Exists(strFileLocation) Then
  28.                 'read all the lines in the file
  29.                 Dim arrDBULineCount() As String = IO.File.ReadAllLines(DecodeText(strFileLocation))
  30.  
  31.                 With prgDatabaseExecution
  32.                     'set the minimum to 0%
  33.                     .Minimum = 0
  34.                     'set the maximum to 100%
  35.                     .Maximum = 100
  36.                     'give step the value of the number of lines in the dbu file
  37.                     .Step = CInt(arrDBULineCount.Length.ToString)
  38.                     'get the incremental by dividing the line count by 100
  39.                     .Value = CInt(.Step / .Maximum)
  40.                     'start the progress bar
  41.                     .PerformStep()
  42.  
  43.                     If .Value = 100 Then
  44.                         'now that the request has been completed, delete the file
  45.                         IO.File.Delete(strFileLocation)
  46.  
  47.                         With tmrProgBar
  48.                             .Stop()
  49.                             .Enabled = False
  50.  
  51.                             'resize the form
  52.                             With Me
  53.                                 .Height = 110
  54.                                 .Width = 300
  55.                             End With
  56.  
  57.                             'show the done button
  58.                             cmdDone.Visible = True
  59.                         End With
  60.                     End If
  61.                 End With
  62.             End If
  63.         End With
  64.     End Sub
  65. End Class
error is
An unhandled error has occurred in the application and the error log is attached for resolution assignment.

Message:
Illegal characters in path.

Stack trace:
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.GetFileName(String path)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding)
at System.IO.File.ReadAllLines(String path, Encoding encoding)
at System.IO.File.ReadAllLines(String path)
at BusinessStudio.frmSQLExecuteProgress.tmrProgBar_Tick(Object sender, EventArgs e) in D:\BusinessStudio\frmSQLExecuteProgress.vb:line 29
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)