question about string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • raids51
    New Member
    • Nov 2007
    • 59

    question about string

    im making a program that basically brute forces a string by converting the first character to its ascii code and then adding one. when the ascii code reaches 126 then the second character will go up one and the first char will start back at 32.then it will convert the ascii codes back to characters and set label 3 to reflect that text.But the problem i have is that when it does it once then each characters index value is decreased by one and the next time it will go up one. IE the firstch starts as the 1st char so its index is 1. but the next time i run the code the firstcharacters index will be 0...i want to know how to fix this easily the code for it is
    Code:
      Dim firstch As Integer = Asc(txt.Chars(1))
            Dim secondch As Integer = Asc(txt.Chars(2))
            Dim thirdch As Integer = Asc(txt.Chars(3))
    
    
    
            firstch = firstch + 1
    
        
            txt = ChrW(firstch) & ChrW(secondch) & ChrW(thirdch) & "a"
            Label3.Text = txt
Working...