Hi, what I want to do is to edit every char in a txtbox for ex: txtbox1.text = "Rudi"
Now it must take the text length and count each step, when the char (thats being checked atm = R) then textbox2.text = textbox2.text + "1R1"
then it must go to the next char and "u" must = "1u1" and should be added to textbox 2
So when T1 = "Rudi is my name" then T2 should be = "1R11u11d11i1 1i11s1 1m11y1 1n11a11m11e1"
The point of this is so that i can use a secret code..and set each letter to a value..ex R = 1614641
I DON"T want the bit like 10101101
Please and thanks
Problem vs2012 textbox char edit
Page 1 of 14 Replies - 90 Views - Last Post: 29 January 2013 - 09:29 PM
Replies To: Problem vs2012 textbox char edit
#2
Re: Problem vs2012 textbox char edit
Posted 29 January 2013 - 12:00 PM
NB THIS ISN'T VB6
Output:
Oops, I need to get rid of the slashes - give me a mo!
Added: here
Dim strClip As String = "Rudi is my name" strClip = Regex.Replace(strClip, "(\w)", "\1$1\1") Console.WriteLine(strClip)
Output:
Quote
'\1R\1\1u\1\1d\1\1i\1 \1i\1\1s\1 \1m\1\1y\1 \1n\1\1a\1\1m\1\1e\1
Oops, I need to get rid of the slashes - give me a mo!
Added: here
strClip = Regex.Replace(strClip, "(\w)", "1${1}1")
This post has been edited by andrewsw: 29 January 2013 - 12:05 PM
#3
Re: Problem vs2012 textbox char edit
Posted 29 January 2013 - 12:01 PM
What have you tried already?
in VB6 you would use the LEN function for the length of the string.
You would use the MID$ function to each individual character.
You would use a loop to work around the full string.
And there you go, Andrew beat me to it.
in VB6 you would use the LEN function for the length of the string.
You would use the MID$ function to each individual character.
You would use a loop to work around the full string.
And there you go, Andrew beat me to it.
#4
Re: Problem vs2012 textbox char edit
Posted 29 January 2013 - 09:22 PM
i have VS 2012 .. will go and try to see if code works
#5
Re: Problem vs2012 textbox char edit
Posted 29 January 2013 - 09:29 PM
Nice, it works, but please help me to understand -> what is /w for? and can i give ex: R or u an individual value ex: R = 13 and u = 55
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|