VB.NET take each letter of a word and display in ListBox
Posted
by Kaleet
on Stack Overflow
See other posts from Stack Overflow
or by Kaleet
Published on 2010-05-12T04:17:39Z
Indexed on
2010/05/12
4:24 UTC
Read the original article
Hit count: 197
Private Sub btnWord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWord.Click Dim Inputter As String Dim Words As String = ""
Do
Inputter = InputBox("Enter word", "Enter Word")
If Inputter <> String.Empty Then
lstDisplay.Items.Add(Inputter)
Word += Inputter.Substring(0, 1)
End If
Loop Until Inputter <> String.Empty
' SOMETHING GOES HERE!!!!!'
lstDisplay.Items.Add("---")
lstDisplay.Items.Add(Word)
End Sub
Here is how it works, when you click the button it displays an input box so for example type in "CAT".
But I can't figure out how to get it to do C (newline) A (newline) T (newline) within the listbox. Please help!
C
A
T
-
CAT
© Stack Overflow or respective owner