Connecting Tech Pros Worldwide Help | Site Map

help for newbi neede

Coffee
Guest
 
Posts: n/a
#1: Nov 20 '05
i want to transfer the content of a text box/message box to a string
array. like i have the word "hellO" and want the h to be myvariable(1),
the e myvariable(2) the l myvariable(3) and so on... can i read out text
box positions? like textbox.capture.position.1 or somehow like this??
thanx

CJ Taylor
Guest
 
Posts: n/a
#2: Nov 20 '05

re: help for newbi neede


I'm going to make an inherited textbox that has the method capture just
because you put it here. =)

Actually, Textbox.Text is of type String

So you can just use

Dim myArray() as String

myArray = textbox.text.toCharArray

-CJ


"Coffee" <therethere40@hotmail.com> wrote in message
news:3F7480C1.2000409@hotmail.com...[color=blue]
> i want to transfer the content of a text box/message box to a string
> array. like i have the word "hellO" and want the h to be myvariable(1),
> the e myvariable(2) the l myvariable(3) and so on... can i read out text
> box positions? like textbox.capture.position.1 or somehow like this??
> thanx
>[/color]


Armin Zingler
Guest
 
Posts: n/a
#3: Nov 20 '05

re: help for newbi neede


"Coffee" <therethere40@hotmail.com> schrieb[color=blue]
> i want to transfer the content of a text box/message box to a string
> array. like i have the word "hellO" and want the h to be
> myvariable(1),
> the e myvariable(2) the l myvariable(3) and so on... can i read out
> text box positions? like textbox.capture.position.1 or somehow like
> this?? thanx[/color]


Don't know if I got it, but I think the Chars property of a string returns
the char at the given position.


--
Armin

Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
#4: Nov 20 '05

re: help for newbi neede


Coffee <therethere40@hotmail.com> scripsit:[color=blue]
> i want to transfer the content of a text box/message box to a string
> array. like i have the word "hellO" and want the h to be
> myvariable(1), the e myvariable(2) the l myvariable(3) and so
> on... can i read out text box positions? like
> textbox.capture.position.1 or somehow like this??[/color]

I think it's better to use a character array for this purpose:

\\\
Dim achr() As Char = Me.TextBox1.Text.ToCharArray()
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Cor
Guest
 
Posts: n/a
#5: Nov 20 '05

re: help for newbi neede


Hi Coffee,
Because there are so many answers, the string itself was (and is) one of the
first arrays, but mostly we don't think about it in that way.
It is an array of characters.
Cor


Closed Thread