单选题 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

答案解析

暂无解析

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考