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. Visual Basic
  4. Key event question

Key event question

Scheduled Pinned Locked Moved Visual Basic
question
2 Posts 2 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.
  • K Offline
    K Offline
    KaptinKrunch
    wrote on last edited by
    #1

    The scenario can be best described as the following. A form is created with only a label. A keyup event is added to the form so that when a key is pressed the value of that key is added to the label. Now when I add a couple of radio buttons and a standard button to the same form, this procedure does not work. I want the form to handle the key event not some control. Why can I not set the form to have focus when other controls are present? I hope this makes sense! Thanks!

    R 1 Reply Last reply
    0
    • K KaptinKrunch

      The scenario can be best described as the following. A form is created with only a label. A keyup event is added to the form so that when a key is pressed the value of that key is added to the label. Now when I add a couple of radio buttons and a standard button to the same form, this procedure does not work. I want the form to handle the key event not some control. Why can I not set the form to have focus when other controls are present? I hope this makes sense! Thanks!

      R Offline
      R Offline
      Richard_Wolf
      wrote on last edited by
      #2

      Set the KeyPreview propery of your form to TRUE.

      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