beef137
asked on
Making "donk" sound when pressing enter
I'm using Visual Studio 2008 and I have textboxes on a form. When I press "enter" on this form it performs a search which fills a datagridview. After the operation is complete it makes a "donk" sound. How can I get the "donk" sound to go away when you press enter while the active control is a textbox?
I don't have VS2008 on hand, but go to Control Panel->Sounds and audio devices->Sounds tab and see if visual studio has a section in the list of windows sounds. If it does you can customize / disable the sounds in that list.
ASKER
Frosty,
Thanks for the response. But my compiled application makes this sound. Not just when Visual Studio is running.
Thanks for the response. But my compiled application makes this sound. Not just when Visual Studio is running.
What event is responding to the "Enter" on the form?
Click event of the "accept" button? Enter event of a textbox?
Click event of the "accept" button? Enter event of a textbox?
ASKER
Private Sub SearchForm_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEv entArgs) Handles MyBase.KeyDown
If TypeOf Me.ActiveControl Is TextBox And e.KeyCode = Keys.Return Then
SearchList()
Else
If TypeOf Me.ActiveControl Is DataGridView And e.KeyCode = Keys.Return Then
OpenRecordSearch()
End If
End If
End Sub
If TypeOf Me.ActiveControl Is TextBox And e.KeyCode = Keys.Return Then
SearchList()
Else
If TypeOf Me.ActiveControl Is DataGridView And e.KeyCode = Keys.Return Then
OpenRecordSearch()
End If
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.