模拟试题

3773考试网计算机等级考试模拟试题正文

2010年3月计算机等考二级VB模拟题及解析(2)

来源:fjzsksw.com 2010-1-28 15:57:20

 

  (25) 在窗体上画一个名称为Drive1的驱动器列表框,一个名称为Dir1的目录列表框,一个名称为File1的文件列表框,两个名称分虽为Label1、Label2,标题分别为空白和"共有文件"的标签。编写程序,使得驱动器列表框与目录列表框、目录列表框与文件列表框同步变化,并且在标签Label1中显示当前文件夹中文件的数量。如图所示。

  能够正确实现上述功能的程序是

  A) Private Sub Dir1_Change()

  File1.Path=Dir1.Path

  End Sub

  Private Sub Dive1_Change()

  Dir1.Path=Drive1.Drive

  Label1.Caption=File1.ListCount

  End Sub

  B) Private Sub Dir1_Change()

  File.Path=Dir1.Path

  End Sub

  Private Sub Dive1_Change()

  Dir1.Path=Drive1.Drive

  Label1.Caption=File1.List

  End Sub

  C) Private Sub Dir1_Change()

  File1.Path = Dir1.Path

  Label1.Caption = File1.ListCount

  End Sub

  Private Sub Drive1_Change()

  Dir1.Path = Drive1.Drive

  Label1.Caption = File1.ListCount

  End Sub

  (D) Private Sub Dir1_Change()

  File1.Path=Dir1.Path

  Label1.Caption=File1.ListCount

  End Sub

  Private Sub Dive1_Change()

  Dir1.Path=Drive1.Drive

  Label1.Caption= File1.List

  End Sub

  正确答案: C

 

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

触屏版 电脑版
3773考试网 琼ICP备12003406号-1