Click here to Skip to main content
15,562,561 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

A listbox contains 100 listbox items with vertical scrollbar enabled.
now list box is displaying (visible) 10 items. If i scroll next 11th item is visible and 1st item is hidden now (internally ,it just gone up list box top).

Now my question is how to find out whether that particular item is visible and all others are hidden in the listbox.

Is my question clear? or am i confusing?




Regards
Jegan
Posted

1 solution

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.SelectedIndex = 0

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 10
MsgBox(ListBox1.SelectedIndex)
End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900