Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.Items.Add("참외")
ListBox1.Items.Add("오이")
ListBox1.Items.Add("가지")
ListBox1.Items.Add("오징어")
ListBox1.Items.Add("나무")
ListBox1.Items.Add("호박")
ListBox1.Items.Add("사탕")
ListBox1.Items.Add("수박")
ListBox1.Items.Add("나물")
ListBox1.Items.Add("사진")
ListBox1.Items.Add("호두")
ListBox1.Items.Add("가자미")
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
ListBox2.Items.Clear()
For Each item In ListBox1.Items
If item.contains(TextBox1.Text) Then
ListBox2.Items.Add(item)
End If
Next
End Sub
End Class