Connecting Tech Pros Worldwide Help | Site Map

help for newbi neede

  #1  
Old November 20th, 2005, 03:10 AM
Coffee
Guest
 
Posts: n/a
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

  #2  
Old November 20th, 2005, 03:10 AM
CJ Taylor
Guest
 
Posts: n/a

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]


  #3  
Old November 20th, 2005, 03:11 AM
Armin Zingler
Guest
 
Posts: n/a

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

  #4  
Old November 20th, 2005, 03:11 AM
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a

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>
  #5  
Old November 20th, 2005, 03:12 AM
Cor
Guest
 
Posts: n/a

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