Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows ding on textbox

Windows ding on textbox

Scheduled Pinned Locked Moved C#
questiondatabase
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    InOut NET
    wrote on last edited by
    #1

    I have use ENTER key to move focus from current control(textbox, combo,etc) to the next control in the tab index list. I get that done, but windows sound a 'ding' everytime i hit enter. The ding does not sound when TAB or UP-DOWN arrows are used. Ive tried alot of stuff, but i do'nt know why it's sounding, so i ca't really say for shure where to look. How can I disable the 'ding' when using the ENTER key? Andre

    M C 2 Replies Last reply
    0
    • I InOut NET

      I have use ENTER key to move focus from current control(textbox, combo,etc) to the next control in the tab index list. I get that done, but windows sound a 'ding' everytime i hit enter. The ding does not sound when TAB or UP-DOWN arrows are used. Ive tried alot of stuff, but i do'nt know why it's sounding, so i ca't really say for shure where to look. How can I disable the 'ding' when using the ENTER key? Andre

      M Offline
      M Offline
      Mairaaj Khan
      wrote on last edited by
      #2

      InOut.NET wrote:

      How can I disable the 'ding' when using the ENTER key?

      Check ur Control Panel>>Sound settings.

      I 1 Reply Last reply
      0
      • M Mairaaj Khan

        InOut.NET wrote:

        How can I disable the 'ding' when using the ENTER key?

        Check ur Control Panel>>Sound settings.

        I Offline
        I Offline
        InOut NET
        wrote on last edited by
        #3

        programmatclly. I don't want to disable the sound globally, just for the control.

        1 Reply Last reply
        0
        • I InOut NET

          I have use ENTER key to move focus from current control(textbox, combo,etc) to the next control in the tab index list. I get that done, but windows sound a 'ding' everytime i hit enter. The ding does not sound when TAB or UP-DOWN arrows are used. Ive tried alot of stuff, but i do'nt know why it's sounding, so i ca't really say for shure where to look. How can I disable the 'ding' when using the ENTER key? Andre

          C Offline
          C Offline
          Christian Wulff
          wrote on last edited by
          #4

          You need to catch the control's KeyPress event and set the Handled property of the KeyPressEventArgs to true:

          private void comboBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
          {
          // Check if the user pressed enter (enter = 13)
          if (e.KeyChar == 13)
          e.Handled = true;
          }

          I 1 Reply Last reply
          0
          • C Christian Wulff

            You need to catch the control's KeyPress event and set the Handled property of the KeyPressEventArgs to true:

            private void comboBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
            {
            // Check if the user pressed enter (enter = 13)
            if (e.KeyChar == 13)
            e.Handled = true;
            }

            I Offline
            I Offline
            InOut NET
            wrote on last edited by
            #5

            genius, Thanks.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups