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 shortcuts

Windows shortcuts

Scheduled Pinned Locked Moved C#
csharp
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.
  • J Offline
    J Offline
    Jonathan Slenders
    wrote on last edited by
    #1

    Does anyone know how i can create a program which can add shortcuts for windows with c#. The program run on background. So if i press a key in windows the program give me a message. Jonathan Slenders

    H 1 Reply Last reply
    0
    • J Jonathan Slenders

      Does anyone know how i can create a program which can add shortcuts for windows with c#. The program run on background. So if i press a key in windows the program give me a message. Jonathan Slenders

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Shortcuts or hooks? If you're talking about shortcut links, this doesn't make any sense. There are articles that discuss that here on CP. If you're talking about keyboard shortcuts, you have to install a Windows hook to handle keyboard presses if your app isn't in the foreground. While it's not a good idea to use C# to do this (too slow for handling system-level events and you have to P/Invoke functions and redefine structures), you can read the article here on CP: http://www.codeproject.com/csharp/NetWin32Hooks.asp[^].

      -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

      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