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. Windows Forms
  4. Simulate key strokes to trigger shortcut

Simulate key strokes to trigger shortcut

Scheduled Pinned Locked Moved Windows Forms
databasequestion
2 Posts 2 Posters 2 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
    flipdoubt
    wrote on last edited by
    #1

    I want to trigger a behavior for which a third party component provides a keyboard shortcut. The user can trigger this behavior with CTRL+SHIFT+V, but I want to do it automatically in certain circumstances. Any ideas?

    K 1 Reply Last reply
    0
    • F flipdoubt

      I want to trigger a behavior for which a third party component provides a keyboard shortcut. The user can trigger this behavior with CTRL+SHIFT+V, but I want to do it automatically in certain circumstances. Any ideas?

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      I am not sure it is a great idea, but you can do keystrokes with the SendKeys. I think a better solution would be when you want to call the same method if you can see the event that is getting called I would try to call it. Or if there is a button that can be clicked you can always do button.PerformClick() Hope that helps. Ben

      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