473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Unable to remove Beep on Alt+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
2 2132
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Anon Email | last post by:
Hi everyone, Let's see, now. This question is about the capabilities of ANSI C++. I want to write and compile code in ANSI C++ that, when compiled, will make the computer speaker beep; or, at...
2
by: Ivo | last post by:
In an Win/IE-only application, some checkboxes and the like have been assigned accesskeys, so pressing alt+w focuses a checkbox, alt+b another. This is very convenient. However, when the checkboxes...
2
by: Tim Marshall | last post by:
The following is happening in two instances in A2003. The one I s\describe is the easiest one. Theme controls and autocorrupt have been turned off long ago. An unbound main form with a list...
2
by: PeterW | last post by:
This is a re-post of a problem I have been struggling with for some time now. I'm sure I'm doing something silly! I have a data entry form with text boxes bound to a query. The user can enter...
3
by: Evangelista Sami | last post by:
hello i have this strange error message that i dont understand : _search.c: In function `_depth_search': _search.c:218: unable to find a register to spill in class `AREG' _search.c:218: this...
9
by: jgcrawford | last post by:
G'day, I'm writing a ringtone manager for nokia ringtones and I'd like to be able to play the ringtone on the PC speaker. I've had some success in DOS with turbo C and its sound(), delay() and...
9
by: Smiley | last post by:
Hi, Can someone tell me how to remove aspostophe (') from user input. I don't want to give any error message. Just want to remove or change it to "" or null, such input when it appear anywhere...
2
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
I have a tabcontrol where I want to capture the CTRL+C key combination. My tabcontrol has on its tabpages some treeView controls. My intention is to intercept the event of pressing the CTRL+C when...
5
Tarantulus
by: Tarantulus | last post by:
Hi, ok, quick description of the problem, I'm trying to reference the postdata from some checkboxes. Unfortunately the checkboxes are dynamically generated therefore I don't know how many there...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.