单项选择题
在窗体上有一个名称为List1的列表框和一个名称为Command1的命令按钮,并编写有如下事件过程:
Private Sub Form_Load()
List1.AddItem "Item1":List1.AddItem"Item2":List1.AddItem"Item3"
End Sub
Private Sub Command1_Click()
List1.List(List1.ListCount)="New Item"
End Sub
程序执行时,单击命令按钮,其结果为( )。
A.把字符串“New Item”添加到列表框中,但位置不能确定
B.把列表框中原有的最后一项改为“New Item”
C.把字符串“New Item”添加到列表框的最后(即“Item3”的后面)
D.把字符串“New Item”插入到列表框的最前面(即“Item1”的前面)
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
在E盘当前目录文件夹下建立一个名为“Student.txt”的随机文件,要求用InputBox函数输入5个学生的姓名(StuName)、年级(StuGrade)和年龄(StuAge)。在程序中有以下记录类型和窗体的事件过程,请选择正确的语句完成程序( )。 Private Type student StuName As String * 10 StuGrade As String * 10 StuAge As Integer End Type Private Sub Form Click() Dim s As student Open c: student.txt For Random As#1 Len=Len(s) For i=1 To 5 s.StuName=InputBox( 请输入姓名 ) s.StuGrade=InputBox( 请输入年级号 ) s.StuAge=Val(InputBox( 请输入年龄 )) ______ Next i Close #1 End Sub
A.Print #1,s
B.Print #1,i
C.Put #1,,s
D.Put #1,i
点击查看答案&解析
单项选择题
单击命令按钮执行以下程序,则输出结果为( )。 Private Sub Command1_Click() Dim x As Integer,y As Integer X=14:y=48 Call Proc(x,y) Print x;y End Sub Public Sub Proc(n As Integer,ByVal m As Integer) n=n Mod 10:m=m Mod 10 End Sub
A.4 8
B.14 8
C.14 48
D.4 48
点击查看答案&解析
相关试题
下列叙述中有错误的是( )。
在窗体上有一个名称为Drive1的驱动器列表...
为了在运行时能显示窗体左上角的控制框(系...
VB中有3个键盘事件:KeyPress、KeyDown、K...
在表达式2+3*4^5-Sin(x+1) 2...