farradjs
Messages postés73Date d'inscriptionlundi 17 novembre 2003StatutMembreDernière intervention16 mars 2009 24 janv. 2005 à 21:56
c'est simple il faut utiliser la propriété topindex du listbox
voici un ptit prog pour synchroniser 2 listbox tu peux le faire pour n listbox.
cré une form ajoute 2 listbox et timer tu peux cacher les scrollbar en mettan l'un sur l'autre a+
Dim focus1 As Boolean
Dim focus2 As Boolean
Private Sub Form_Load()
For i = 1 To 50
List1.AddItem i
List2.AddItem i * 10
Next
End Sub
Private Sub List1_GotFocus()
focus1 = True
End Sub
Private Sub List1_LostFocus()
focus1 = False
End Sub
Private Sub List2_GotFocus()
focus2 = True
End Sub
Private Sub List2_LostFocus()
focus2 = False
End Sub
Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
List2.ListIndex = List1.ListIndex
End Sub
Private Sub List2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)