你可以试试这个,使用vb2012做的
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox1.Focus()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If TextBox1.TextLength > 0 Then
ListBox1.Items.Add(TextBox1.Text)
TextBox1.Clear()
TextBox1.Focus()
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim i As Integer = 0
If TextBox1.TextLength > 0 Then
If ListBox1.Items.Count > 0 Then
For i = 0 To ListBox1.Items.Count - 1
ListBox1.SelectedIndex = i
ListBox1.Items.Remove(TextBox1.Text)
Exit For
Next
End If
End If
End Sub
End Class