编写VB程序,实现如下功能:单击“启动”按钮Command1,在列表框List1内每隔2秒输出一个由30个大、小写字母组合成的字符串,运行界面如图所示,程序代码如下。(字母A和字母a的ASCII码值分别为65、97)
(1)
该程序除窗体外使用了(填数字)个对象。
(2)
为实现上述功能,请在划线处填入合适的代码。Private Sub Command1_Click() Timer1.Enabled = 'End SubPrivate Sub Timer1_Timer() Dim s As String, c As String Dim a As Integer, e As Integer, h As Integer Randomize s = "" For a = 1 To 30 e = Int(Rnd() * 52 + 1) If e <= 26 Then h = e + 64 Else h = ' End If c = ' s = s + c Next a List1.AddItem sEnd Sub
(3)
为了减缓字符串的出现速度,可将Timer1的Interval属性值 (选填,填字母)
A . 调大
B . 调小
答案: 【1】3
【1】true【2】e + 70【3】Chr(h)
A