Darn Ding

B

Bob

I'm trying to prevent the beep when the tab key is pressed. It works ok on
XP but windows 2000 is ding ding ding

Here is my code:

Protected Overrides Function ProcessDialogKey(ByVal keyData As
System.Windows.Forms.Keys) As Boolean
'MyBase.ProcessDialogKey(keyData)
End Function

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Dim MyKey As System.Windows.Forms.Keys
If e.KeyCode = Keys.Down Then
MyKey = Keys.Tab
ElseIf e.KeyCode = Keys.Tab Then
MyKey = Keys.Tab
e.Handled = True '<---Here I
tried to handle it but still.
ElseIf e.KeyCode = Keys.Up Then
MyKey = Keys.Shift + Keys.Tab
End If
MyBase.ProcessDialogKey(MyKey)
'e.Handled = True '<---I tried it
here also
End Sub

TIA

Bob
 
B

Brian Henry

I've never heard of windows 2000 making a ding noise when tabbing. What
custom code do you have in your forms for key handlers and such? You have to
have something in there that is causeing this noise to execute, because a
standard brand new form with two text boxes on it in windows 2000 when
tabbing makes no noise.
 
B

Brian Henry

if this is tabbing between items like this, make sure you are handleing all
the objects too if you expect key down and key up to tab also, because
pressing down and up on a text box that doesnt have it handled on that box
too will cause this beep. handleing it on the form only isn't enough, the
objects need to handle it also.
 
B

Bob

Brian:
What custom code do you have in your forms for key handlers and such?

Protected Overrides Function ProcessDialogKey(ByVal keyData As
System.Windows.Forms.Keys) As Boolean
'MyBase.ProcessDialogKey(keyData)
End Function

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Dim MyKey As System.Windows.Forms.Keys
If e.KeyCode = Keys.Down Then
MyKey = Keys.Tab
ElseIf e.KeyCode = Keys.Tab Then
MyKey = Keys.Tab
e.Handled = True
ElseIf e.KeyCode = Keys.Up Then
MyKey = Keys.Shift + Keys.Tab
End If
MyBase.ProcessDialogKey(MyKey)
'e.Handled = True
End Sub
if this is tabbing between items like this, make sure you are handleing
all the objects too if you expect key down and key up to tab also, because
pressing down and up on a text box that doesnt have it handled on that box
too will cause this beep. handleing it on the form only isn't enough, the
objects need to handle it also.

How can I handle it for all the objects without doing it for each object
individualy? I have 327 fields on my form so handling each one would be
quite a task if I have to do them each individualy. I don't get the beep
when I use the up and down arrow.

TIA

Bob
 
M

Mike

I was also annoyed by the Beep feature of Windows2000. You can disable the
Beep by:

On the Desktop, Right-Click on 'My Computer.'
Select 'Properties'.
Click the 'Hardware' tab.
Click on the 'Device Manager...' button.
Click on the 'View' menu.
Verify 'Show Hidden Devices' is checked.
Scroll Down Device Manager unto 'Non-Plug and Play Drivers' and expand the
tree.
Right-Click on the 'Beep' Driver.
Select 'Properties'.
On the 'General' tab, under 'Device usage',
Select 'Do not use this device (Disable)' in the combo box.
Click OK.
The system will ask for a reboot.

No more beeps should occur.

The Beep can also be re-Enabled in much the same way.
The system will again ask for a reboot.

Hope this helps,

Mike
 
B

Bob

Mike:

Thanks. That did the trick. Thats the next thing I was looking to do but I
just couldn't find where to disable that darn ding in windows.

Thanks again

Bob
 
J

Jim Hughes

You could also stop and disable the "Beep" service using the Services applet
in the Control Panel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top