473,508 Members | 2,422 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

transfer textbox text to a string arry?

I have asked this before, but the offered solution did not work.
I want to have a command button, that transfers any text from a textbox
to a variable which is an array. so that i can print out single letters
of the text.
e.g. if i have "hello" in the textbox and i print out the forth letter
it should list "l"....
can someone tell me howto?

Nov 20 '05 #1
3 1931
"Coffee" <th**********@hotmail.com> schrieb
I have asked this before, but the offered solution did not work.
I want to have a command button, that transfers any text from a
textbox to a variable which is an array. so that i can print out
single letters of the text.
e.g. if i have "hello" in the textbox and i print out the forth
letter it should list "l"....
can someone tell me howto?


The text of the textbox is returned by it's text property. The type is
"String". A string object offers a chars property.
--
Armin

Nov 20 '05 #2
* Coffee <th**********@hotmail.com> scripsit:
I have asked this before, but the offered solution did not work.
I want to have a command button, that transfers any text from a
textbox to a variable which is an array. so that i can print out
single letters of the text.

e.g. if i have "hello" in the textbox and i print out the forth letter
it should list "l"....


'MsgBox(Me.TextBox1.Text.Chars(3))'.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Cor
Hi Coffee,
I have asked this before, but the offered solution did not work.
I want to have a command button, that transfers any text from a textbox
to a variable which is an array. so that i can print out single letters
of the text.
e.g. if i have "hello" in the textbox and i print out the forth letter
it should list "l"....
can someone tell me howto?


A lot of Coffee today.

In addition from the other answers. The textbox.text is a string. A string
is in itself an array of characters.

You get something out of that using VB string functions or Net string
members.

The index start at 0 so the 4th character is 3.

Using a string member it will be your example is the fouth letter
textbox1.text.substring(3,1). 4 character with a length of 1.

When you want to use a single character, use the char, do you want a part of
the string then substring.

Cor

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
6264
by: Chapman | last post by:
Some questions about strings: this is the extracted piece of my test code: /** **/ char *arry; arry = malloc(30*sizeof(arry)); arry = 'B'; arry = 'S'; arry = 'c';
0
1160
by: Andrew | last post by:
Can someone out there help. I am using Server. Transfer from a user control to a webform and tried to follow many examples exactly as specified but cannot get around the (Specified cast is not...
5
3735
by: Nedu N | last post by:
Hi All, I am facing a typical problem in my .NET application with the pop-up script messages. The thing is that its working fine when i run on my development machine but not running in expected...
2
3357
by: Pete | last post by:
Hi all... I sincerly hope one of the MS guys can clear this up for me... First some background... Ok, I have a web site which is fully translatable into several languages. All the strings...
4
2288
by: ewolfman | last post by:
Hi, This may sound a little complicated, but here goes: I have 2 webforms (lets call them 'x' and 'y'). * - 'x' is a form which contains a single server side TextBox web control, and an...
9
10994
by: tawright915 | last post by:
I want to convert a byte array to a string or text to write it out in a multiline textbox. I've tried encoding, and converting but end up with nothing in the textbox. The strange thing is that...
3
1556
by: decren | last post by:
Hello, I have a form with 4 tables. Table 1 & 2 are not associated with my problem so I'll start with Table3. Table3 contains an input-textbox; and a push-button to add a new row to Table4. The...
2
3687
by: chirag1989 | last post by:
i have created an arry of text box now i want to retrieve the values of each text box so as to insert them in data base can anyone help how can i retrieve the values of array of textbox and store...
21
3926
by: imtmub | last post by:
I have two page one is parent and child. Parent page has text field and command button. The Link button open a child page as a popup. Child page as Text box and Button. when i click the button it...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5625
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.