回覆列表
-
1 # 掉眼淚的冠軍
-
2 # 使用者6437608732773
Private Sub Command1_Click()
Dim s As String, t As String, p As String
s = Text1.Text
t = ""
For i = 1 To Len(s)
p = Mid(s, i, 1)
If Asc(p) > 96 And Asc(p)
t = t & Chr(Asc(p) - 32)
End If
If Asc(p) > 64 And Asc(p)
t = t & Chr(Asc(p) + 32)
End If
Next i
Text1.Text = t
End Sub
Private Sub Form_Load()
Text1.Text = "AaBbCcDdEeFfGgHhIiJjKk"
End Sub
Private Sub Command1_Click()Dim s As String, t As String, p As Strings = Text1.Textt = ""For i = 1 To Len(s) p = Mid(s, i, 1) If Asc(p) > 96 And Asc(p) < 123 Then t = t & Chr(Asc(p) - 32) End If If Asc(p) > 64 And Asc(p) < 91 Then t = t & Chr(Asc(p) + 32) End IfNext iText1.Text = tEnd Sub Private Sub Form_Load()Text1.Text = "AaBbCcDdEeFfGgHhIiJjKk"End Sub