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. How can i send keystrokes to a window in created by another process

How can i send keystrokes to a window in created by another process

Scheduled Pinned Locked Moved Visual Basic
questiontutorialdiscussion
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.
  • Q Offline
    Q Offline
    Quatl
    wrote on last edited by
    #1

    I'm writeing a small app to automate common taskes in a console based application.I need to send key strokes from my application to the other application, while it is running.I have tried to use System.IO.Process.StandardInput.Write("c") etc but it doesn't work for me. Any thoughts on how to go about this? More generaly is there an easy way (or hard way for that mater) to send an arbitrary windows message to another application? Thanks ---Quatl

    M 1 Reply Last reply
    0
    • Q Quatl

      I'm writeing a small app to automate common taskes in a console based application.I need to send key strokes from my application to the other application, while it is running.I have tried to use System.IO.Process.StandardInput.Write("c") etc but it doesn't work for me. Any thoughts on how to go about this? More generaly is there an easy way (or hard way for that mater) to send an arbitrary windows message to another application? Thanks ---Quatl

      M Offline
      M Offline
      Martin Cross
      wrote on last edited by
      #2

      You could try using SendKeys(), which in theory might work, it is placing keys into the keyboard buffer after all, so another app. that has the foucs might well pick them up.

      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