-->

jueves, 26 de mayo de 2011

UTILIZANDO LIST BOX

OTRO EJERCICIO EN CLASE
PublicClassForm1

PrivateSub ListBox1_SelectedIndexChanged(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

EndSub

PrivateSub Button1_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button1.Click

listbox1.Items.Add(TextBox1.Text)



EndSub

PrivateSub Button2_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button2.Click

ListBox2.Items.RemoveAt(TextBox2.Text)
EndSub

PrivateSub Button3_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button3.Click
ListBox2.Items.Add(ListBox1.SelectedItem)

EndSub

PrivateSub Button4_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button4.Click
ListBox1.Items.Add(ListBox2.SelectedItem)
EndSub
EndClass







PublicClassForm1

PrivateSub ListBox1_SelectedIndexChanged(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

EndSub

PrivateSub Button1_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button1.Click

listbox1.Items.Add(TextBox1.Text)



EndSub

PrivateSub Button2_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button2.Click

ListBox2.Items.RemoveAt(TextBox2.Text)
EndSub

PrivateSub Button3_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button3.Click
ListBox2.Items.Add(ListBox1.SelectedItem)

EndSub

PrivateSub Button4_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button4.Click
ListBox1.Items.Add(ListBox2.SelectedItem)
EndSub
EndClass




 

No hay comentarios:

Publicar un comentario