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. Programatically place characters in an input stream

Programatically place characters in an input stream

Scheduled Pinned Locked Moved C#
tutorialquestion
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.
  • S Offline
    S Offline
    SebbaP
    wrote on last edited by
    #1

    Hi, I am writing a concole application in which the user should be able to edit already entered/obsolete information. What I would like to do is to have Console.ReadLine read the obsolete information as if it was entered by the user and thereafter process keyboard input as usual. Like this: :>edit entry1 entry1: obsolete information_ In DOS, this could for example involve writing each character to the keyboard buffer. Can I force characters into an input stream or somehow modify the stream's underlying structure? Thanks!

    D 1 Reply Last reply
    0
    • S SebbaP

      Hi, I am writing a concole application in which the user should be able to edit already entered/obsolete information. What I would like to do is to have Console.ReadLine read the obsolete information as if it was entered by the user and thereafter process keyboard input as usual. Like this: :>edit entry1 entry1: obsolete information_ In DOS, this could for example involve writing each character to the keyboard buffer. Can I force characters into an input stream or somehow modify the stream's underlying structure? Thanks!

      D Offline
      D Offline
      Daniel Turini
      wrote on last edited by
      #2

      SebbaP wrote: Hi, I am writing a concole application in which the user should be able to edit already entered/obsolete information. What I would like to do is to have Console.ReadLine read the obsolete information as if it was entered by the user and thereafter process keyboard input as usual. Like this: :>edit entry1 entry1: obsolete information_ In DOS, this could for example involve writing each character to the keyboard buffer. Can I force characters into an input stream or somehow modify the stream's underlying structure? While you could do the same things using the Console API via DLLImport, this would be a huge hassle, just to avoid doing a GUI. Usually, you use console applications where user interaction is not needed (e.g., batch files). You'll spend lots and lots of lines of code trying to emulate a textbox in a console application and you'll end up with a poor interface: all of this is already done, and with a better face. Yes, even I am blogging now!

      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