Write a program in VB.Net to do the followning operation on List-box and combo box controls 1) Add item 2) Remove Item 3) Sort Items 4) Single Selection of Item 5) Multi Selection of Item 6) Extended Multi Select of Item 7) Displaying Multiple Columns of Entries 8) Clear Items. Add the following to your form 1) One List Box Control 2) One Combo Box Control 3) One Command Button (For Remove)


Public Class Form1

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        ListBox1.Items.Add(TextBox1.Text)

        ComboBox1.Items.Add(TextBox1.Text)

        TextBox1.Text = ""

        TextBox1.Focus()

    End Sub


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        ListBox1.Items.Remove(TextBox1.Text)

        ComboBox1.Items.Remove(TextBox1.Text)

    End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

        ComboBox1.Sorted = True

        ListBox1.Sorted = True

    End Sub


    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        ListBox1.SelectionMode = SelectionMode.One

    End Sub


    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click

        ListBox1.MultiColumn = True

    End Sub


    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click

        ListBox1.SelectionMode = SelectionMode.MultiExtended

    End Sub


    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

        ListBox1.SelectionMode = SelectionMode.MultiSimple

    End Sub


    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click

        ListBox1.Items.Clear()

        ComboBox1.Items.Clear()


    End Sub


    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click


    End Sub

End Class
Write a program in VB.Net to do the followning operation on List-box and combo box controls 1) Add item 2) Remove Item 3) Sort Items 4) Single Selection of Item 5) Multi Selection of Item 6) Extended Multi Select of Item 7) Displaying Multiple Columns of Entries 8) Clear Items. Add the following to your form 1) One List Box Control 2) One Combo Box Control 3) One Command Button (For Remove) Write a program in VB.Net to do the followning operation on List-box and  combo box controls                   1)             Add item                    2)             Remove Item                  3)             Sort Items                  4)             Single Selection of Item                  5)             Multi Selection of Item                  6)             Extended Multi Select of Item                  7)             Displaying Multiple Columns of Entries                  8)             Clear Items.        Add the following to  your form        1) One List Box Control        2) One Combo Box Control        3) One Command Button (For Remove) Reviewed by on April 27, 2015 Rating: 5
Powered by Blogger.