在窗体上画一个名称为Drive1的驱动器列表框,一个名称为Dir1的目录列表框,一个名称为File1的文件列表框,两个名称分虽为Lahel1、Label2,标题分别为空白和 "共有文件"的标签。编写程序,使得驱动器列表框与目录列表框、目录列表框与文件列表框同步变化,并且在标签Label1中显示当前文件夹中文件的数量。如图所示。能够正确实现上述功能的程序是
A:Private Sub Dir1_Change( ) FilePath=Dir1.Path End Sub Private Sub Dive1_Change( ) Dir1.Path=Drive1.Drive Label1,Caption=File1 ListCount End Sub B:Private Sub Dir1_Change( ) FilPath=Dtr1.Path End Sub privage Sub Dive1_Change( ) Dir1.path=Drive1.Drive Lahel1.Caption=File1.List End Sub C:Private Sub Dir1_Change( ) File1. Path = DirPath Label1.Caption=File1, ListCount End Sub Private Sub Drive1_Change( ) Dir1.Path = Drive1. Drive Label1.Captiol1 = File1.ListCount End Sub( D:Private Sub Dir1_Change( ) File Path = DirPath Label1.Caption = File1.ListCount End Sub Private Sub Dive1_Change( ) Dir1.Path = Drive1.Drive Label1.Caption = File1.List End Sub
在窗体上画一个名称为Drivel的驱动器列表框,一个名称为Dirl的目录列表框,一个名称为Filel的文件列表框,两个名称分别为Label1、Label2、标题分别为空白和“共有文件”的标签。编写程序,使得驱动器列表框与目录列表框、目录列表框与文件列表框同步变化,并且在标签Labell中显示当前文件夹中文件的数量。如图所示。
能够正确实现上述功能的程序是
A:PriVate Sub Dir1_Change() FilePath=Dir1.Path End Sub Private Sub Dirvel_Change() Dir1.Path=DriveDrive LabelCaption=FileListCount End Sub B:Private Sub Dir1_Change() FilePath=Dir1.Path End Sub Private Sub Drivel_Change() DirPath=DriveDrive LabelCaption=FileList End Sub C:Private Sub Dir1_Change() FilePath=Dir1.Path LabelCaption=File1.ListCount End Sub Private Sub Drivel_Change() Dir1.Path=DriveDrive LabelCaption=Fil1.ListCount End Sub D:Private Sub Dir1_Change() File1.Path=Dir1.Path LabelCaption=FileList End Sub Private Sub Drivel_Change() Dir1.Path=DriveDrive LabelCaption=FileList End Sub