By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,064 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,064 IT Pros & Developers. It's quick & easy.

Unable to remove Beep on Alt+A

P: n/a
I created a sample Project with a basic form and one text box. I put
"e.Handled = True" on every KeyDown, KeyPress and KeyUp event for both
the Form and the TextBox. When I run the app, and press the Alt+A (or
any Alt+character) button, it beeps (very annoying). Does anyone know
why and how to fix it?

Nov 3 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Paul,

There is a very old answer that was always done by Armin Zingler in past in
this newsgroup.

http://groups.google.com/group/micro...9f0dc571012f2d

If this is not the right have than a search yourself than for Armin Zingler
on Google in this Newsgroup.

However, I hope this helps direct.

Cor

"Paul" <pw****@hotmail.comschreef in bericht
news:11**********************@i42g2000cwa.googlegr oups.com...
>I created a sample Project with a basic form and one text box. I put
"e.Handled = True" on every KeyDown, KeyPress and KeyUp event for both
the Form and the TextBox. When I run the app, and press the Alt+A (or
any Alt+character) button, it beeps (very annoying). Does anyone know
why and how to fix it?

Nov 4 '06 #2

P: n/a
I had the same problem, except I needed the beep removed on the entire
form. One possible way is to put a Menu Strip on the form and set
visible to false if you don't use it.

The solution I found was to set e.SuppressKeyPress to True after
handling the form's KeyDown event. So your code would look something
like:

Private Sub frm_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.Alt AndAlso e.KeyValue = Keys.A Then
<EXECUTE ALT-A CODE HERE>
e.SuppressKeyPress = True
End If
End Sub

The form will still beep when you hit another Alt combination that is
not explicitly handled and then the args keypress suppressed as above.

Drew

Cor Ligthert [MVP] wrote:
Paul,

There is a very old answer that was always done by Armin Zingler in past in
this newsgroup.

http://groups.google.com/group/micro...9f0dc571012f2d

If this is not the right have than a search yourself than for Armin Zingler
on Google in this Newsgroup.

However, I hope this helps direct.

Cor

"Paul" <pw****@hotmail.comschreef in bericht
news:11**********************@i42g2000cwa.googlegr oups.com...
I created a sample Project with a basic form and one text box. I put
"e.Handled = True" on every KeyDown, KeyPress and KeyUp event for both
the Form and the TextBox. When I run the app, and press the Alt+A (or
any Alt+character) button, it beeps (very annoying). Does anyone know
why and how to fix it?
Nov 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.