|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Unable to remove Beep on Alt+AI 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? Paul,
There is a very old answer that was always done by Armin Zingler in past in this newsgroup. http://groups.google.com/group/microsoft.public.dotnet.languages.vb/msg/509f0dc571012f2d 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 Show quoteHide quote "Paul" <pwh***@hotmail.com> schreef in bericht news:1162572161.473595.198260@i42g2000cwa.googlegroups.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? > 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: Show quoteHide quote > Paul, > > There is a very old answer that was always done by Armin Zingler in past in > this newsgroup. > > http://groups.google.com/group/microsoft.public.dotnet.languages.vb/msg/509f0dc571012f2d > > 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" <pwh***@hotmail.com> schreef in bericht > news:1162572161.473595.198260@i42g2000cwa.googlegroups.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? > >
Merge/Synchronize XML Files
[Regular Expression] (aaa AND bbb) OR (ccc AND ddd) Disposing of Windows Forms don't show error windows Printer Ink Status Can reflection tell the base class of an object? Deleting Values from an XML node? VB6 query format for comparing number value Prevent Date Enter before Current date Problem with Calendar Control |
|||||||||||||||||||||||