I have a textbox with autocomplete set to suggest. I want to execute my code in the Textbox_KeyDown event on the enter key, but enter key is also invoked when I select an item from the text box autocomplete items. That is not what I want. I want the selected item in the textbox and then execute my code.
privatevoid opdrverwTextbox_KeyDown(object sender, KeyEventArgs e)
if (e.KeyData == (Keys.Enter) && !string.IsNullOrEmpty(opdrverwTextbox.Text))
//here is the problem. In debugging if I select from dropdown// with mouse click: e.KeyData = LButton | MButton | Back
e.Handled = true;
a lot of other code........;
opdrverwTextbox.Visible = false;
opdrverwLabel.Visible = false;
I don't want to set autocomplete to suggest-append. is there a workaround for this?