Read ListBox Up Down(Reorder ListBox: From bottom to top) - Visual Basic .NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

Read ListBox Up Down(Reorder ListBox: From bottom to top)- vb.net
After user clicks Reorder Button, Listbox2 will read items in Listbox1 from bottom to top:
Reorder ListBox- vb.net
Reorder Button Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
 Handles Button1.Click
        Dim a As Integer
        Dim b As String
        Do
            a = ListBox1.Items.Count - 1
            b = ListBox1.Items(a)
            ListBox2.Items.Add(b)
            ListBox1.Items.RemoveAt(a)
        Loop Until a = 0
End Sub


Share This

Home | About | Contact | Privacy Policy

Copyright visual-basic-tutorials.com 2017 - All Rights Reserved.