W
Wayne1943
Guest
I wrote a program about five years ago that encrypts text. The program works as intended, but being old (76) I cannot remember/get a progress bar to work as the text is being processed through encryption. Button3 on Form3 makes the call for encryption. I have commented out my attempt at a progress bar inasmuch as it did not work anyway.
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim Source As String = TextBox1.Text
Dim fileReader As String
Label3.Visible = True '**********Encrypting text...this will take awhile.***************
Me.Refresh()
'Call the Encrypt function Encrypt and pass it the Source varible.
Call Encrypt(Source)
'Private Sub ProgressBar1_Click(sender As System.Object, e As System.EventArgs) Handles ProgressBar1.Click
' Dim i As Integer
' ProgressBar1.Minimum = 0
' Sets the Maximum for the progress bar to the lenght of the of the combined string (NumerOf).
' ProgressBar1.Maximum = NumberOf
' For i = 0 To NumberOf
' ProgressBar1.Value = i
' Next 'End Sub
'*************************************************
'Reads encrypted from disk file into Form3 Text Box 2.
fileReader = My.Computer.FileSystem.ReadAllText(strWholePathVar)
Me.TextBox2.Text = (fileReader)
Label3.Text = "Encryption complete."
End Sub
End Class
Someone could please give me a tip in how to display code? If I cut it from my code editor and past it here with code tags around it, it puts it all on one line.
Continue reading...
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim Source As String = TextBox1.Text
Dim fileReader As String
Label3.Visible = True '**********Encrypting text...this will take awhile.***************
Me.Refresh()
'Call the Encrypt function Encrypt and pass it the Source varible.
Call Encrypt(Source)
'Private Sub ProgressBar1_Click(sender As System.Object, e As System.EventArgs) Handles ProgressBar1.Click
' Dim i As Integer
' ProgressBar1.Minimum = 0
' Sets the Maximum for the progress bar to the lenght of the of the combined string (NumerOf).
' ProgressBar1.Maximum = NumberOf
' For i = 0 To NumberOf
' ProgressBar1.Value = i
' Next 'End Sub
'*************************************************
'Reads encrypted from disk file into Form3 Text Box 2.
fileReader = My.Computer.FileSystem.ReadAllText(strWholePathVar)
Me.TextBox2.Text = (fileReader)
Label3.Text = "Encryption complete."
End Sub
End Class
Someone could please give me a tip in how to display code? If I cut it from my code editor and past it here with code tags around it, it puts it all on one line.
Continue reading...