Code:
For i = 0 To ListBox1.Items.Count - 1
For a As Integer = 0 To stringname(30)
stringname(a) = ListBox1.Items(i).ToString
If a > ListBox1.Items.Count Then
Exit For
End If
stringname(a) = MessageTransposition(stringname(a), True)
Next
Next
The first line starts the loop that gets the items in a listbox.
Code:
For i = 0 To ListBox1.Items.Count - 1
The second line starts the loop for setting the value of the item to stringname(0-30)
Code:
For a As Integer = 0 To stringname(30)
the third line is the line that sets stringname(a) to = the the text value of the current item
Code:
stringname(a) = ListBox1.Items(i).ToString
the if then statement checks to see if a is greater than the number of items in the listbox. if it is it exits the loop.
Code:
If a > ListBox1.Items.Count Then
Exit For
End If
the next line calls the decryption/encryption function and gives it the value of stringname(a). when it gets the encrypted data back as MessageTransposition then it sets stringname(a) to = MessageTransposition
Code:
stringname(a) = MessageTransposition(stringname(a), True)
the problem again is that the value of a doesn't go up. hope i have mad it as clear as i can.