标题:计算机二级上机真题
取消只看楼主
若前1309
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-9-12
 问题点数:0 回复次数:0 
计算机二级上机真题

有2个命令按钮: 读数据和统计,单击读数据,则将文件夹内容写进去(只有字母和空格)显示在TEXT1中。TEXT1选中内容后,单击统计,则自动统计选中文本中从未出现过的字母,将这些字母以大写的形式显示在TEXT2中。求问号部分怎么写?????
Option Base 1
Dim x As String, max_n As Integer
Private Sub Command1_Click()
Open App.Path & "\in4.dat" For Input As #1
s = Input(LOF(1), #1)
Close #1
Text1.Text = s
End Sub

Private Sub Command2_Click()
Dim a(26) As Integer

sl = Text1.SelLength
st = Text1.SelText
Text2.Text = ""

' If ? Then
MsgBox "请先选择文本!"
Else
' For i = 1 To ?
c = Mid(st, i, 1)
If c <> " " Then
n = Asc(UCase(c)) - Asc("A") + 1
' a(n) = ?
End If
Next
' For i = 1 To ?
If a(i) = 0 Then
Text2.Text = Text2.Text + " " + Chr(Asc("A") + i - 1)
End If
Next
End If
End Sub

搜索更多相关主题的帖子: 计算机 上机 
2007-09-12 23:46



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-169510-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012605 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved