Link to home
Start Free TrialLog in
Avatar of Djof
Djof

asked on

System "ding" on alt-enter in edit control

I have added a delegate to the KeyDown event of an edit control. I want to check if enter was pressed so I can act accordingly, or if alt-enter was pressed to take an alternate action. Everything works well, except I get a "ding" on alt-enter.

Is there a way to disable this? I do not want to use shift-enter or ctrl-enter as they are commonly used for new line. Thanks.
Avatar of Timbo87
Timbo87

After you run the code, try adding: e.Handled = true; if you use e for your EventArgs.
To clarify, I mean add e.Handled = true; after the last line of your method, before the }.
Avatar of Djof

ASKER

Hehe. I should have mentionned I tried this without success. Sorry. :)
ASKER CERTIFIED SOLUTION
Avatar of Timbo87
Timbo87

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial