2个回答
展开全部
Private Sub Command1_Click()
Dim i As Integer, n As Integer
RichTextBox1.SetFocus
For i = 1 To Len(RichTextBox1.Text)
n = Asc(Mid(RichTextBox1.Text, i, 1))
If n < 65 Or (n > 90 And n < 97) Or n > 122 Then
RichTextBox1.SelStart = i - 1
RichTextBox1.SelLength = 1
RichTextBox1.SelColor = QBColor(12)
End If
Next
End Sub
Dim i As Integer, n As Integer
RichTextBox1.SetFocus
For i = 1 To Len(RichTextBox1.Text)
n = Asc(Mid(RichTextBox1.Text, i, 1))
If n < 65 Or (n > 90 And n < 97) Or n > 122 Then
RichTextBox1.SelStart = i - 1
RichTextBox1.SelLength = 1
RichTextBox1.SelColor = QBColor(12)
End If
Next
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2016-05-24
展开全部
richtextbox+asc,很容易就搞定,你先百度百度咯
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询