0

我有一个项目与将文本循环成垂直和水平

假设看起来像这样 http://pastebin.com/UJ6LZybU

请帮助我:(这是我尝试过的代码,但它只显示了单词的结尾

    Dim input As String = "HELLOWORLD"
    Dim i As Integer = 0

    For i = 0 To input.Length - 1
        Dim words As Char = input(i)
        TextBox1.Text = ("HELLOWORLD" & vbNewLine & words)
    Next

这个项目可以在任何类型的循环中回答 doloop forloop

4

2 回答 2

0

设置 TextBox1.Multiline = True 并调整大小

    Dim input As String = "HELLOWORLD"

    TextBox1.Text = ("HELLOWORLD" & Environment.NewLine)
    For i As Integer = 1 To input.Length - 1
        TextBox1.Text &= (input(i) & Environment.NewLine)
    Next
于 2013-07-24T17:44:14.577 回答
0

这应该这样做:

Dim i As Integer
Dim input As String = "HELLOWORLD"
TextBox1.Text = input 

For i = 1 To input.Length - 1
    TextBox1.Text &= vbNewLine & input(i)
Next
于 2013-07-24T17:44:58.717 回答