Loop through the items with a for loop and just check the items text with an if-clause.
Loop through the items with a for loop and just check the items text with an if-clause.
[highlight=vbnet]
'Replace TextBox1 with your search TextBox
Dim index As Integer = ListBox1.FindString(TextBox1.Text)
If Not index < 0 Then
For x As Integer = 0 To ListBox1.Items.Count - 1
If (ListBox1.Items(x).ToString.Contains(TextBox1.Text )) Then
ListBox1.SelectedIndex = x
Return
End If
Next
End If[/highlight]
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Hassan (10-03-2011),metalen666 (10-05-2011)