VB 字符串交换问题
PrivateSubForm_Load()Text1=""Text2=""Text1.MaxLength=20Text2.Locked=TrueEndSubPrivate...
Private Sub Form_Load()
Text1 = ""
Text2 = ""
Text1.MaxLength = 20
Text2.Locked = True
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim k As Integer, i As Integer
If KeyAscii = 13 Then
Text2 = ""
k = Len(Text1)
For i = 1 To k
Text2 = Mid(Text1, i, 1) & Text2
Next i
End If
End Sub
程序中的Text2 = Mid(Text1, i, 1) & Text2是什么意思
一开始的LOAD事件中已经用了 text2="",为什么在keypress里还要用同样的text2="" 展开
Text1 = ""
Text2 = ""
Text1.MaxLength = 20
Text2.Locked = True
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim k As Integer, i As Integer
If KeyAscii = 13 Then
Text2 = ""
k = Len(Text1)
For i = 1 To k
Text2 = Mid(Text1, i, 1) & Text2
Next i
End If
End Sub
程序中的Text2 = Mid(Text1, i, 1) & Text2是什么意思
一开始的LOAD事件中已经用了 text2="",为什么在keypress里还要用同样的text2="" 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询