单选

20.在窗体上绘制一个名称为List1的列表框,一个名称为Label1的标签,列表框中显示若干个项目。当单击列表框中的某个项目时,在标签中显示被选中的项目的名称。下列能正确实现上述操作的程序是 。

  • A.Private Sub List1_Click()    Labell.Caption=List.ListIndex
  • End Sub
  • B.Private Sub List1_Click()    Labell.Name=List1.ListIndex
  • End Sub
  • C.Private Sub List1_Click()    Labell.Name=List1.Text
  • End Sub
  • D.Private Sub List1_Click()    Labell.Caption=List.Text
  • End Sub
参考答案
您可能感兴趣的试题

31.设在工程中有一个标准模块,其中定义了如下记录类型:

Type Books

 Name As String *10

 Te1Num As String *20

End Type

 在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1_Click时,在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是。

  • A.Private Sub Command1_Click()
  • Dim B As Books    Open"c":\Person.txt"For Output As #1
  • B.Name=InputBox("输入姓名")
  • B.Te1Num=InputBox("输入电话号码")    Write #1,B.Name,B.Te1Num
  • Close #1
  • End Sub
  • B.Private Sub Command1_Click()
  • Dim B As Books    Open"c":\Person.txt"For Input As #1
  • B.Name=InputBox("输入姓名")
  • B.Te1Num=InputBox("输入电话号码")    Prite #1,B.Name,B.Te1Num
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服