is any way to now when the cursor in the listbox reach the top and the bottom.
Not sure what you mean by that…
I think he wants to do some kind of scrolling if the mouse is over the last row of a ListBox?
i need to make a class for on demand recordset to fill the listbox.
so i need to now when the cursor reach the top to get more records and the same for the bottom.
Bottom I guess would be
If myListbox.ListIndex = myListBox.ListCount then
GetNextRecords
End If
Top would then be
If myListbox.ListIndex = 0 Then
GetPreviousRecords
End If
If I understand you right, you are trying to find when the cursor is in the top or bottom row of the listbox being displayed. You then intend to fetch the next (or previous) set of data. Is that correct? If so, you could use the ListBox’s RowFromXY(xValue, yValue)
method to see what row the mouse is in and fetch new data as needed.
yes Dale
thanks
Thats the code I was offering above. Put it in the mouse up event or key up event to check if the current list index is at the top i.e. 0 or at the bottom equal to the number of items in the list.
ok
Thanks Mike
FYI, my Data-On-Demand ListBox subclass does this.
this work on Web App