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. Short Keys

Short Keys

Scheduled Pinned Locked Moved C#
question
3 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.
  • T Offline
    T Offline
    t_nedelchev
    wrote on last edited by
    #1

    Hello every body. How can I catch Key press but not like event for a Form or other component. For exapmle: if my program is started end is presed keys F1,F2,... and etc. I want to catch this Keys presed. Thanks for all.

    D 1 Reply Last reply
    0
    • T t_nedelchev

      Hello every body. How can I catch Key press but not like event for a Form or other component. For exapmle: if my program is started end is presed keys F1,F2,... and etc. I want to catch this Keys presed. Thanks for all.

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

      Set your form's KeyPreview property to true then use the form's KeyDown, KeyPress or KeyUp events.

      T 1 Reply Last reply
      0
      • D DaveyM69

        Set your form's KeyPreview property to true then use the form's KeyDown, KeyPress or KeyUp events.

        T Offline
        T Offline
        t_nedelchev
        wrote on last edited by
        #3

        Thanks DaveyM69 it works!!! :)

        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