Hi Guys!

I have problem coding with a vertical Scroll bar.
I made a label in form1 and a vertical scroll bar next the it on the right side.
The vertical Scroll bar is to scroll down the label if the label is full of text.

Here is my code

Private Sub VScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles VScrollBar1.Scroll
        Label1.Top = VScrollBar1.Value
    End Sub

And I found out.When running, the label itself moves but not the text showing on the label.

Anyone can tell me what i have done wrong? Or did I just used the wrong tool to display large amount of text that it doesn't go further on in a label?

Thank you!!


You can't do that or you should create your own Label.

Is there a raison to use a Label, because the Listbox is created for that with VScrollbar.

Yep,the tool Richtextbox sovled the problem. Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.