1

有没有办法像这样合并文本框:

textbox1 : O N E
textbox2 : T W O

所以当我合并它时,它看起来像:

OTNWEO

4

1 回答 1

1

你应该为你的文本框文本做一个循环..

Function MyMerge(byval string1 as string, byval string2 as string) as string
Dim x as Integer iif(string1.Length >= String2.Length, String2.Length, String1.Length )
For i as Integer = 1 to x
  MyMerge &= iif(string1.length >= x, string1.substring(i-1,1),"") 
  MyMerge &= iif(string2.length >= x, string2.substring(i-1,1),"")
Next

End Function 

因此,您可以通过 ..

Msgbox(MyMerge(TextBox1.Text, TextBox2.Text))
于 2013-09-02T06:35:45.860 回答