Advertisement
jsauto

Untitled

Apr 9th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.37 KB | None | 0 0
  1. Private Sub FindStringButton_Click(ByVal sender As System.Object, _
  2. ByVal e As System.EventArgs) Handles FindStringButton.Click
  3.     Dim index As Integer = ListBox1.FindString(TextBox1.Text)
  4.     If (index < 0) Then
  5.         MessageBox.Show("找不到你要的選項.")
  6.         TextBox1.Text = String.Empty
  7.     Else
  8.         ListBox1.SelectedIndex = index
  9.     End If
  10. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement