SIMULATE TYPEWRITER EFFECT IN TEXTBOX

Lady Bird Johnson

Total Post:20

Points:140
Posted by  Lady Bird Johnson
C# 
C#
 3506  View(s)
Ratings:
Rate this:

I've searched a lot but didn't found anything , what I want to know is how I can type into a textbox slowly ... I mean for example , Typing letter by letter like if I was writing it ...

  1. Hank Greenberg

    Post:12

    Points:84
    Re: Simulate typewriter effect in textbox

    It sounds like you are trying to simulate typing text into a UI in C# and want it to go more slowly to look closer to what a human would type. If so then why not add artificial pauses in between sending key strokes?

    void TypeText(string text) {
      foreach (var c in text) { 
        SendKeyStroke(c);
        Thread.Sleep(TimeSpan.FromSeconds(1));
      }
    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!