Public Class Form1
Private Sub btnagregar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnagregar.Click
Me.lstnumeros.Items.Add(txtnumero.Text)
txtnumero.Focus()
txtnumero.SelectAll()
End Sub
Private Sub btnborrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnborrar.Click
Dim i As Integer
i = Me.lstnumeros.FindString(Me.txtelminar.Text)
If i = ListBox.NoMatches Then
MessageBox.Show("No existe el número buscado", "Mensaje", )
Else
Me.lstnumeros.Items.RemoveAt(i)
End If
End Sub
End Class
No hay comentarios:
Publicar un comentario