merhaba Arkadaşlar;

Ben timer kullanarak Label'e bir sayac yaptım ve saniye 1 er 1 er artıyor. Bir tane de buton yaptım, butona bastığım zaman saniye Listbox'a ekleniyor. Eklenen sayıları Buyukten kucuğe sıralamak istiyorum nasıl yapabilirim.

ListBox2.Sorted = True Bunu denedim fakat olmadı,

Şoyle de bir durum var orneğin

Saniye 1 de bastığımda ekleniyor, Saniye 10 da bastığımda ise 1. sırada olması gerekirken 1'in altına geliyor.

---------------------------------------------------------------------

Dim i, j, yedek As Integer

For i = 0 To ListBox2.Items.Count - 1

For j = i To ListBox2.Items.Count - 1

If Val(ListBox2.Items(j)) > Val(ListBox2.Items(i)) Then

yedek = Val(ListBox2.Items(i))

ListBox2.Items(i) = ListBox2.Items(j)

ListBox2.Items(j) = yedek

End If

Next

Next
__________________