Published in: VB.NET
plz help me with the source code.............
Private Sub Form_Load() ' Set frame's height to the "virtual screen size (500 items)" Frame1.Height = Label1(0).Height * 500 ' Set scroll bar parameters (0-499) VScroll1.Max = 499 VScroll1.Min = 0 ' Create (or place) the 500 items -- labels in this case For i = 1 To 499 Load Label1(i) Label1(i).Top = Label1(0).Height * i Label1(i).Caption = i Label1(i).Visible = True Next End Sub Private Sub Form_Resize() Frame1.Width = ScaleWidth - VScroll1.Width VScroll1.Left = Frame1.Width VScroll1.Height = ScaleHeight End Sub Private Sub VScroll1_Change() ' Calculate the new top of the frame as a negative number Frame1.Top = -Label1(0).Height * VScroll1.Value End Sub
You need to login to post a comment.
