永发信息网

VB程序问题求解 要求编写程序,在文本框输入一串英文字母(不区分大、...

答案:1  悬赏:60  手机版
解决时间 2021-01-29 04:35
  • 提问者网友:爱唱彩虹
  • 2021-01-28 10:56
VB程序问题求解
要求编写程序,在文本框输入一串英文字母(不区分大、小写),单击命令按钮,程序可找出未在文本框出现的其他所有英文字母,并以大写的方式降序表示到Text1中。例如,若在Text1中输入的是"abDfdb",则单击Command1按钮后,Text1中显示的是"ZYXWVUTSRQPONMLKJIHGEC",补充程序
Private Sub Command1_Click()
Dim str As String, s As String , c As String
str=UCase(Text1.Text)
s=" "
c=" Z "
While c >="A"
If Instr(str,c)=0 Then
s=_________
End If
c=Chr(Asc(c)_____)
Wend
If s <>" " Then
Text.Text=________
End If
End Sub
最佳答案
  • 五星知识达人网友:白昼之月
  • 2021-01-28 11:59
Private Sub Command1_Click()
Dim str As String, s As String, c As String
str = UCase(Text1.Text)
s = ""
c = "Z"
While c >= "A"
If InStr(str, c) = 0 Then
s = s + c
End If
c = Chr(Asc(c) - 1)
Wend
If s <> " " Then
Text1.Text = s
End If
End Sub

满意请采纳哦~
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯