Click here to Skip to main content
   

C#

 
GeneralRe: How to modify a line in the Word file using C# ? Pinmembertaibc25-Dec-12 17:40 
GeneralRe: How to modify a line in the Word file using C# ? PinmvpRichard MacCutchan25-Dec-12 22:06 
GeneralRe: How to modify a line in the Word file using C# ? Pinmembertaibc25-Dec-12 23:46 
QuestionProblem with textbox key down and autocomplete PinmemberGrooverFromHolland24-Dec-12 11:34 
Hi all,
 
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.
 

code:
 
private void 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.Clear();
                opdrverwTextbox.Visible = false;
                opdrverwLabel.Visible = false;
                dataGridView_Update();
            }           
        }

I don't want to set autocomplete to suggest-append.
is there a workaround for this?
 
Merry Christmas,
Groover
 

b>
0200 A9 23
0202 8D 01 80
0205 00

AnswerRe: Problem with textbox key down and autocomplete PinmemberGrooverFromHolland27-Dec-12 8:56 
QuestionHow to reference .net DLL present in other folder PinmemberKASR124-Dec-12 7:58 
AnswerRe: How to reference .net DLL present in other folder Pinmemberjschell24-Dec-12 9:00 
GeneralRe: How to reference .net DLL present in other folder PinmemberKASR125-Dec-12 8:11 
GeneralRe: How to reference .net DLL present in other folder Pinmemberjschell25-Dec-12 17:32 
GeneralRe: How to reference .net DLL present in other folder PinmemberKASR126-Dec-12 2:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.150326.1 | Last Updated 27 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid