用vb编写一个子程序过程,实现字符串的大小写转换,求解答
PrivateSubCommand1_Click()DimchAsStringch=Text1.Text___________________________Text1....
Private Sub Command1_Click()
Dim ch As String
ch = Text1.Text
___________________________
Text1.Text = ch
End Sub
Private Sub conversion(____________________)
Dim i As Integer, ch As String * 1
For i = 1 To Len(s)
ch = Mid(s, i, 1)
If ch >= "A" And ch <= "Z" Then
Mid(s, i, 1) = LCase(ch)
ElseIf ____________________Then
Mid(s, i, 1) = UCase(ch)
End If
Next i
End Sub 展开
Dim ch As String
ch = Text1.Text
___________________________
Text1.Text = ch
End Sub
Private Sub conversion(____________________)
Dim i As Integer, ch As String * 1
For i = 1 To Len(s)
ch = Mid(s, i, 1)
If ch >= "A" And ch <= "Z" Then
Mid(s, i, 1) = LCase(ch)
ElseIf ____________________Then
Mid(s, i, 1) = UCase(ch)
End If
Next i
End Sub 展开
1个回答
展开全部
Private Sub Command1_Click()
Dim ch As String
ch = Text1.Text
Call conversion(ch)
Text1.Text = ch
End Sub
Private Sub conversion(s As String)
Dim i As Integer, ch As String * 1
For i = 1 To Len(s)
ch = Mid(s, i, 1)
If ch >= "A" And ch <= "Z" Then
Mid(s, i, 1) = LCase(ch)
ElseIf ch >= "a" And ch <= "z" Then
Mid(s, i, 1) = UCase(ch)
End If
Next i
End Sub
Dim ch As String
ch = Text1.Text
Call conversion(ch)
Text1.Text = ch
End Sub
Private Sub conversion(s As String)
Dim i As Integer, ch As String * 1
For i = 1 To Len(s)
ch = Mid(s, i, 1)
If ch >= "A" And ch <= "Z" Then
Mid(s, i, 1) = LCase(ch)
ElseIf ch >= "a" And ch <= "z" Then
Mid(s, i, 1) = UCase(ch)
End If
Next i
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询