vb中怎样将滚动条的滚动时候的值显示出来

2024-11-23 04:51:31
推荐回答(2个)
回答1:

Private Sub VScroll1_Change()
Label1.Caption = VScroll1.Value
End Sub

Private Sub VScroll1_Scroll()
Label1.Caption = VScroll1.Value
End Sub
你参考一下

回答2:

Private Sub Form_Load()
HScroll1.Max = 100
VScroll1.Max = 100
Label1.Caption = ""
Label2.Caption = ""
End Sub

Private Sub HScroll1_Change()
Label1.Caption = HScroll1.Value
End Sub

Private Sub HScroll1_Scroll()
Label1.Caption = HScroll1.Value
End Sub

Private Sub VScroll1_Change()
Label2.Caption = VScroll1.Value
End Sub

Private Sub VScroll1_Scroll()
Label2.Caption = VScroll1.Value
End Sub