vb.net - Visual Studio AutoComplete simulates enter being pressed when selecting -
Visual Studio offers built-in auto-complete functionality for well-known text boxes and combo boxes. I am using Autocomplete Suggestion Method which gives the user a list of options based on their type. The problem I am having is that when the user makes a selection (via mouse) VS The text gives the text selected in the text box and it also simulates the key being pressed on the text box.
The entered keyword event in my program is used to enter a COM port in the text box for it to be able to work as desired, the user should be able to choose the complete option And then add it so that they can change the settings.
Is it possible to stop it from triggering that event or to stop it? I am unsure whether it is possible or how to determine the origins of a keyboard
Here is the code for the keypages as well as the keypages event:
Private subtxtInput_KeyPress (ByVal, as in this object, ByVal e System.Windows.Forms .keyPressEventArgs) handle as txtInput.KeyPress then e.KeyChar = Chr (13) then e.Handled = true end then end sub personal subtxtInput_KeyUp (ByVal object as the sender, ByVal e System.Windows.Forms.KeyEventArgs As handles) txtInput.KeyUp then e.KeyValue = Keys.Enter then then txtInput.Text. ToLower = "cls" or txtInput.Text. ToLower = "clr" or txtInput.Text .toLower = "clear" then txtOutput .Text = "" Otherwise SerialPort1.IsOpen then SerialPort1.Write (txtInput.Text) or MsgBox ("Serial port is not open") End if end then txtInput.Text = "" e.handle = True E. SweepCPresspress = True & End & End
The complete functioning was accomplished through the properties of control, for this the only code was to generate the autocomplete list.
Thanks in advance for any help.
P.S. I am using VB.net, but if necessary I can understand how to get it from another Pure Language to VB
Comments
Post a Comment