单项选择题
在窗体中添加一个列表框(listBox1)和一个命令按钮,并编写如下代码:
Private Sub Command1_ Click()
Dim Entry, I, Msg
Msg = "Choose Ok to add 100 items to your list box."
MsgBox Msg
for I = 1 To 100
Entry = "Entry" & I
List1. AddItem Entry
Next I
End Sub
程序完成的功能是______。
A.本示例使用AddItem方法增加100项给一个列表框
B.本示例使用AddItem方法向一个列表框中添加的内容是1~100的列
C.本示例使用AddItem方法向一个列表框中添加的内容是1~100的和
D.本示例使用AddItem方法增加101项给一个列表框
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有如下的程序片段,该程序片段的执行完后,共执行循环______次。Private Sub command1_ Click() total =0 Counter = 1 do Print Counter total = total + Counter Print total, 111 Counter = Counter + 1 if total >= 10 then exit do End if Loop while Counter <= 10End Sub
有如下的程序片段,该程序片段的执行完后,共执行循环______次。
Private Sub command1_ Click()
total =0
Counter = 1
do
Print Counter
total = total + Counter
Print total, "111"
Counter = Counter + 1
if total >= 10 then
exit do
End if
Loop while Counter <= 10
End Sub
点击查看答案&解析
单项选择题
窗体上画一个命令按钮,然后编写如下代码:Private Type Record ID As Integer Name As String * 20End TypePrivate Sub command1 _ Click( Open c: file. txt for Input As MaxSize = LOF (1) for NextChar =MaxSize To Step-1 Seek #1, NextChar MyChar=Input(1,#1) Next NextChar Print EOF(1) Close #1 End Sub程序运行后,单击命令按钮,其输出结果为______。
A.True
B.False
C.0
D.Null
点击查看答案&解析
相关试题
给出下面的程序:Private Sub Command1...