How to Reorder List in Listbox using VB.Net

0
39

This tutorial is all about How to Reorder List in Listbox using VB.Net. With this tutorial you can Reorder List in Listbox using VB.Net easily. So let’s get started:

  • First is open the Visual Basic, Select File on the menu, then click New and create a new project.

  • Then a New Project Dialog will appear. You can rename your project, depending on what you like to name it. After that click OK

  • Design your form like this just like what I’ve shown you below.
    Add a 2 Listbox and a button.
  • Add this code to the button.
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2. Dim a As Integer
    3. Dim b As String
    4. Do
    5. a = ListBox1.Items.Count - 1
    6. b = ListBox1.Items(a)
    7. ListBox2.Items.Add(b)
    8. ListBox1.Items.RemoveAt(a)
    9. Loop Until a = 0
    10. End Sub
  • Finally, Click F5 to run program.

Output:

 

If you have any comments or suggestion about on How to Reorder List in Listbox using VB.Net, Please Feel Free to contact our webpage.

Download How to Reorder List in Listbox using VB.Net Code Here

Other articles you might read also:

 

Facebook Comments
(Visited 41 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here