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

2024年11月23日 04:51
有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