بفرمایید این کد چیزی است که میخواستید.
private void textBox1_TextChanged(object sender, EventArgs e)
{
string myString = textBox1.Text;
int index = listBox1.FindString(myString, -1);
if (index != -1)
{
listBox1.SetSelected(index, true);
}
}
بفرمایید این کد چیزی است که میخواستید.
private void textBox1_TextChanged(object sender, EventArgs e)
{
string myString = textBox1.Text;
int index = listBox1.FindString(myString, -1);
if (index != -1)
{
listBox1.SetSelected(index, true);
}
}