private void comboBox1_KeyUp(object sender, KeyEventArgs e)
{
int index;
string found;
string actual;
bool bo = e.KeyCode == Keys.Back || e.KeyCode == Keys.Left
|| e.KeyCode == Keys.Right || e.KeyCode == Keys.Up || e.KeyCode == Keys.Down
|| e.KeyCode == Keys.Delete || e.KeyCode == Keys.PageDown
|| e.KeyCode == Keys.PageUp || e.KeyCode == Keys.End
|| e.KeyCode == Keys.Home;
if (bo == true)
return;
actual = this.comboBox1.Text;
index = this.comboBox1.FindString(actual);
if (index > -1)
{
found = this.comboBox1.Items[index].ToString();
this.comboBox1.SelectedIndex = index;
this.comboBox1.SelectionStart = actual.Length;
this.comboBox1.SelectionLength = found.Length;
this.comboBox1.DroppedDown = true;
}
}