Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For i As Integer = 0 To 15
AddStrToTopLst(ComboBox1, "Test Cbo" & i.ToString)
AddStrToTopLst(ListBox1, "Test Lst" & i.ToString)
Next
End Sub
Public Sub AddStrToTopLst(ByRef oObj As Object, ByVal sString As String)
' oObj doit être une ListBox ou un ComboBox
'On utilise la méthode Insert pour mettre l'élément en debut de liste
oObj.Items.Insert(0, sString)
End Sub