0% found this document useful (0 votes)
6 views

Example 2

Uploaded by

samu09160
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Example 2

Uploaded by

samu09160
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Vb.

net Example2

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
Dim a, b As String
a = TextBox1.Text
b = TextBox2.Text
ListBox1.Items.Add(a)
ListBox2.Items.Add(b)
TextBox1.Clear()
TextBox2.Clear()
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
ListBox2.Items.Add(ListBox1.SelectedItem.ToString)
ListBox1.Items.Remove(ListBox1.SelectedItem)
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles


Button3.Click
ListBox1.Items.Add(ListBox2.SelectedItem.ToString)
ListBox2.Items.Remove(ListBox1.SelectedItem)
End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs)


While ListBox1.SelectedIndices.Count > 0
ListBox2.Items.Add(ListBox1.Items)
ListBox1.Items.Remove(ListBox1.Items)
End While
End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs)


ListBox1.Items.Add(ListBox2.SelectedItems.ToString)
ListBox2.Items.Remove(ListBox2.Items)
End Sub

Private Sub Button9_Click(sender As Object, e As EventArgs) Handles


Button9.Click
TextBox1.Clear()
TextBox2.Clear()

End Sub

Private Sub Button6_Click(sender As Object, e As EventArgs) Handles


Button6.Click
ListBox1.Items.Remove(ListBox1.SelectedItem)
End Sub

Private Sub Button10_Click(sender As Object, e As EventArgs) Handles


Button10.Click
ListBox2.Items.Remove(ListBox2.SelectedItem)
End Sub

Private Sub Button8_Click(sender As Object, e As EventArgs) Handles


Button8.Click
ListBox1.Items.Clear()
End Sub

Private Sub Button7_Click(sender As Object, e As EventArgs) Handles


Button7.Click
ListBox2.Items.Clear()

End Sub

You might also like