单选题
VB
题号 #152354
在窗体上画一个名称为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
答案解析
暂无解析
你可能感兴趣的试题
A.2310
B.1920
C.1500
D.1658
A.0 8
B.40 72
C.4 50
D.78 50
A.20 12
20 15
20 15
B.12 20
12 25
12 25
C.24 15
12 20
12 20
D.24 12
12 15
12 15