在窗体上画两个滚动条,名称分别为Hsroll1、Hsroll2;6个标签,名称分别为Label1、Label2、Label3、Label4、Label5、Label6,其中Label1~Label3分别显示"A"、"B"、"A*B"等文字信息,标签Label4、Label5分别显示其右侧的滚动条的数值,Label6显示A*B的计算结果。如下图所示。当移动滚动框时,在相应的标签中显示滚动条的值。当单击命令按钮"计算"时,对标签Label4、Label5中显示的两个值求积,并将结果显示在Label6中,则以下程序不能实现上述过程的是______。
A) Private Sub Command1_Click()
Label6.Caption=Str(Val(Label4.Caption)*Val(Label5.Caption))
End Sub
Private Sub HScroll1_Change()
Label4.Caption=HScroll1.Value
Label5.Caption=HScroll2.Value
End Sub
B) Private Sub Command1_Click()
Label6.Caption=Str(Val(Label4.Caption)*Val(Label5.Caption))
End Sub
Private Sub HScroll1_Change()
Label4.Caption=HScroll1.Value
End Sub
Private Sub HScroll2_Change()
Label5.Caption=HScroll2.Value
End Sub
C) Private Sub Command1_Click()
Label6.Caption=HScroll1*HScroll2
End Sub
Private Sub HScroll1_Change()
Label4.Caption=HScroll1.Value
End Sub
Private Sub HScroll2_Change()
Label5.Caption=HScroll2.Value
End Sub
D) Private Sub Command1_Click()
Label4.Caption=HScroll1.Value
Label5.Caption=HScroll2.Value
Label6.Caption=HScroll1.Value*HScroll1.Value
End Sub
参考答案:A
解析: 本题主要考查的是滚动条的Value属性及事件。选项A) 中,在滚动条Hscroll1的Change事件中,将变动的HScroll2的Value值赋给标签,将会出现错误。