Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5994601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:50:27+00:00 2026-05-22T23:50:27+00:00

I have a very simple Windows Forms Application. And, in Windows (or, atleast Windows

  • 0

I have a very simple Windows Forms Application. And, in Windows (or, atleast Windows Forms Applications), when you press Enter while inside a Single-line TextBox Control, you hear a Ding. It’s an unpleasent sound, that indicated you cannot enter a newline, because it is a single-line TextBox.

This is all fine. However, in my Form, I have 1 TextBox, and a Search Button. And I am allowing the user to Perform a search by pressing Enter after they’ve finished typing, so they don’t have to use the mouse to click the Search Button.

But this Ding sound occurs. It’s very annoying.

How can we make it so just that sound doesn’t play at all in my Form?

@David H – Here’s how I’m detecting the enter pressing:

private void textBox1_KeyUp(object sender, KeyEventArgs e)
{
    if (e.KeyCode == Keys.Enter)
    {
        // Perform search now.
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T23:50:28+00:00Added an answer on May 22, 2026 at 11:50 pm

    Check out the Form.AcceptButton property. You can use it to specify a default button for a form, in this case for pressing enter.

    From the docs:

    This property enables you to designate
    a default action to occur when the
    user presses the ENTER key in your
    application. The button assigned to
    this property must be an
    IButtonControl that is on the current
    form or located within a container on
    the current form.

    There is also a CancelButton property for when the user presses escape.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have (what should be) a very simple Windows Forms application. There is a
I have a borderless Windows Forms application. The main window creates other forms (simple
I have a SQL Express database, and I'd like a very simple forms application
Im playing about with some very simple windows forms. I have an event handler
I have a very simple Windows application, with a few controls, a DataGridView and
I have a very simple windows Service that is developed in vb.net 2008. When
I have a very simple WPF application in which I am using data binding
I have a Windows Forms app, that has a single ElementHost containing a WPF
I'm making a very simple game application. The main form (Form1) has a single
At work we've got a very CPU-intensive Windows Forms application. It's running on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.