代码如下,你在Text1中输入原字符串后按Command1按钮Text2中就出现与原字符串逆序的字符串:
Dim Str as String
Private Sub Form_Click()
Text1 = ""
Text2 = ""
End Sub
Private Sub Command1_Click()
Str = Text1
Text2 = StrReverse(Str)
End Sub
'有很多方法可以实现,我列出其中一种,你参考一下
Private Sub Command1_Click()
Dim i As Integer
Dim l As Integer
l = Len(Text1.Text)
Text2.Text = ""
For i = 0 To l - 1
Text2.Text = Text2.Text + Mid(Text1.Text, l - i, 1)
Next
End Sub