Monday, March 3, 2014

AWP : List Form for Assignment-2






Public Class list_form
    Dim m, n As String

    Private Sub btnclear1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear1.Click
        list1.Text = ""
    End Sub

    Private Sub btnclear2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear2.Click
        list2.Text = ""
    End Sub

    Private Sub btncount1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncount1.Click
        Dim A As Integer = list1.Items.Count
        MsgBox("number of element:" & A)


    End Sub

    Private Sub btncount2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncount2.Click
        Dim A As Integer = list2.Items.Count
        MsgBox("number of element:" & A)

    End Sub

    Private Sub btnremove1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnremove1.Click
        list1.Items.Remove(list1.SelectedItem)
    End Sub

    Private Sub btnremove2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnremove2.Click
        list2.Items.Remove(list2.SelectedItem)
    End Sub

    Private Sub btnadd1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd1.Click

        m = InputBox("Enter Item name:")
        list1.Items.Add(m)



    End Sub

   
    Private Sub btnadd2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd2.Click
        n = InputBox("Enter Item name:")
        list2.Items.Add(n)


    End Sub

    Private Sub list_form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub btn2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn2.Click

    End Sub

    Private Sub btn3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn3.Click
        list1.Text += list2.Text
    End Sub
End Class

No comments:

Post a Comment