把注释和“?“改掉,Text1中字母大小写转换后显示于Label1中非字母则显示本身,Label2显示Text1中字母个数
DimnAsIntegerPrivateSubText1_Change()DimchAsString'ch=Right(?)Ifch>="A"Andch<="Z"Then...
Dim n As Integer
Private Sub Text1_Change()
Dim ch As String
'ch = Right(?)
If ch >= "A" And ch <= "Z" Then
Label1.Caption = LCase(ch)
n = n + 1
ElseIf ch >= "a" And ch <= "z" Then
Label1.Caption = UCase(ch)
n = n + 1
Else
'Label1.Caption = ?
End If
'Label2.Caption = ?
End Sub 展开
Private Sub Text1_Change()
Dim ch As String
'ch = Right(?)
If ch >= "A" And ch <= "Z" Then
Label1.Caption = LCase(ch)
n = n + 1
ElseIf ch >= "a" And ch <= "z" Then
Label1.Caption = UCase(ch)
n = n + 1
Else
'Label1.Caption = ?
End If
'Label2.Caption = ?
End Sub 展开
2个回答
展开全部
Dim n As Integer
Private Sub Text1_Change()
Dim ch As String
'取text1.text的最右端的字母
ch = Right(Text1.Text, Len(Text1.Text))
If ch >= "A" And ch <= "Z" Then
Label1.Caption = LCase(ch)
n = n + 1
ElseIf ch >= "a" And ch <= "z" Then
Label1.Caption = UCase(ch)
n = n + 1
Else
Label1.Caption = Label1.Caption
End If
Label2.Caption = Len(Label1.Caption)
End Sub
Private Sub Text1_Change()
Dim ch As String
'取text1.text的最右端的字母
ch = Right(Text1.Text, Len(Text1.Text))
If ch >= "A" And ch <= "Z" Then
Label1.Caption = LCase(ch)
n = n + 1
ElseIf ch >= "a" And ch <= "z" Then
Label1.Caption = UCase(ch)
n = n + 1
Else
Label1.Caption = Label1.Caption
End If
Label2.Caption = Len(Label1.Caption)
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询