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. IsInputKey override and ding sound

IsInputKey override and ding sound

Scheduled Pinned Locked Moved C#
question
6 Posts 4 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.
  • C Offline
    C Offline
    CiNN
    wrote on last edited by
    #1

    when i override to handle tab in a textbox i have a ding sound like if the key is not supported/is not allowed in here. protected override bool IsInputKey( Keys keyData ) { if ( keyData == Keys.Tab ) { return true; } return base.IsInputKey( keyData ); } so how do i suppressed this sound ?

    R 1 Reply Last reply
    0
    • C CiNN

      when i override to handle tab in a textbox i have a ding sound like if the key is not supported/is not allowed in here. protected override bool IsInputKey( Keys keyData ) { if ( keyData == Keys.Tab ) { return true; } return base.IsInputKey( keyData ); } so how do i suppressed this sound ?

      R Offline
      R Offline
      Robert Rohde
      wrote on last edited by
      #2

      Override OnKeyDown instead and set e.Handled to true.

      C 1 Reply Last reply
      0
      • R Robert Rohde

        Override OnKeyDown instead and set e.Handled to true.

        C Offline
        C Offline
        CiNN
        wrote on last edited by
        #3

        i need to override this to enable getting tab in my keydown override.

        M 1 Reply Last reply
        0
        • C CiNN

          i need to override this to enable getting tab in my keydown override.

          M Offline
          M Offline
          MohammadAmiry
          wrote on last edited by
          #4

          I think Robert is right... in the Keydown event, you may add if(IsInputKey) e.Handled=True.... This would stop the ding I guess....

          V 1 Reply Last reply
          0
          • M MohammadAmiry

            I think Robert is right... in the Keydown event, you may add if(IsInputKey) e.Handled=True.... This would stop the ding I guess....

            V Offline
            V Offline
            Vobulator
            wrote on last edited by
            #5

            I set the e.Handled=true but the annoying beep still coming

            V 1 Reply Last reply
            0
            • V Vobulator

              I set the e.Handled=true but the annoying beep still coming

              V Offline
              V Offline
              Vobulator
              wrote on last edited by
              #6

              i did it. I had to set e.Handled to true in the keypress event. The keydown, keyup wasnt enough.

              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