This should solve your first question
for your second one you need to use a listview
Code:Option Explicit Const UP = 1 Const DOWN = 2 Dim direction As Integer Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Timer1.Enabled = True direction = UP End Sub Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Timer1.Enabled = False End Sub Private Sub Command2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Timer1.Enabled = True direction = DOWN End Sub Private Sub Command2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Timer1.Enabled = False End Sub Private Sub Form_Load() Dim i As Integer Dim j As Integer Timer1.Interval = 100 'load somthing int the 5 lists For i = 0 To 4 For j = 1 To 10 List1(i).AddItem "item " & j Next j Next i End Sub Private Sub Timer1_Timer() Static i As Integer Dim j As Integer i = List1(0).ListIndex Select Case direction Case UP If i > 0 Then List1(0).ListIndex = i - 1 End If Case DOWN If i < List1(0).ListCount - 1 Then List1(0).ListIndex = i + 1 End If End Select 'now sycnchronise the lists For j = 1 To 4 List1(j).TopIndex = List1(0).TopIndex Next j End Sub




Reply With Quote