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. TextBox Event Not Triggering

TextBox Event Not Triggering

Scheduled Pinned Locked Moved C#
visual-studioalgorithmshelpquestion
3 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.
  • F Offline
    F Offline
    Fred Szoldatits
    wrote on last edited by
    #1

    I am using VS 2003 with 1.1 of the framework. (No hope of getting an upgrade :( ) Scenario I am using a textbox which allows a user to input text in order to filter a list. I am using the KeyPress event for the control to save the user from having to click a separate button. Problem The event doesn't fire sometimes. The odd time another control (e.g. a button ) gains focus and fires it's Click event. I have tried searching this site as well as Google to no avail. Has anyone encountered this type of problem?:confused:

    D T 2 Replies Last reply
    0
    • F Fred Szoldatits

      I am using VS 2003 with 1.1 of the framework. (No hope of getting an upgrade :( ) Scenario I am using a textbox which allows a user to input text in order to filter a list. I am using the KeyPress event for the control to save the user from having to click a separate button. Problem The event doesn't fire sometimes. The odd time another control (e.g. a button ) gains focus and fires it's Click event. I have tried searching this site as well as Google to no avail. Has anyone encountered this type of problem?:confused:

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      Other controls should only get activated if they have some kind of shortcut via alt or if they are the accept/cancel buttons (enter / esc). It might be worth checking the keypreview property of your form is set to false.

      1 Reply Last reply
      0
      • F Fred Szoldatits

        I am using VS 2003 with 1.1 of the framework. (No hope of getting an upgrade :( ) Scenario I am using a textbox which allows a user to input text in order to filter a list. I am using the KeyPress event for the control to save the user from having to click a separate button. Problem The event doesn't fire sometimes. The odd time another control (e.g. a button ) gains focus and fires it's Click event. I have tried searching this site as well as Google to no avail. Has anyone encountered this type of problem?:confused:

        T Offline
        T Offline
        Thomas Stockwell
        wrote on last edited by
        #3

        You might want to make sure the Form's KeyPreview Property is set to true. Getting the property information from the object browser for the property: Gets or sets a value indicating whether the form will receive key events before the event is passed to the control that has focus.

        Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios[^]

        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