程序代码: |
'排序
Private Sub SortListBox(ByVal olistbox As ListBox)
Dim listValue(olistbox.Items.Count - 1) As String
Dim Item As Object
Dim i As Integer = 0
For Each Item In Me.ListBox1.Items
listValue(i) = Item.Text.Trim
i = i + 1
Next
Array.Sort(listValue)
Me.ListBox1.Items.Clear()
For j As Integer = 0 To listValue.Length - 1
Me.ListBox1.Items.Add(listValue(j))
Next
End Sub
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |