How to automatically write in text box without keyboard with visual basic.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yusufjammy
    New Member
    • Jan 2010
    • 39

    How to automatically write in text box without keyboard with visual basic.net

    Hi i am newbie in visual basic ?
    How to automatically write in text box without keyboard with visual basic.net ..
    And what is .net(dotnet) ?
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    What is .NET? Oh boy....
    .NET is a developer platform with tools and libraries for building any type of app, including web, mobile, desktop, games, IoT, cloud, and microservices.


    How to automatically write in text box without keyboard
    What does that even mean?

    I HIGHLY SUGGEST you go buy an introductory book on Visual Basic .NET programming at the local book store.

    Comment

    • ThatThatGuy
      Recognized Expert Contributor
      • Jul 2009
      • 453

      #3
      there's a on screen keyboard in Programs-> Accessories->Accessibilit y

      use that

      Comment

      • p309444
        New Member
        • Dec 2009
        • 5

        #4
        Do you mean set the text in a text box programmaticall y?

        textboxid.text= "Hello World"

        Comment

        • smithse
          New Member
          • Jan 2010
          • 3

          #5
          why do you want to do it without the keyboard?

          Comment

          • yusufjammy
            New Member
            • Jan 2010
            • 39

            #6
            I want to write text in textbox . one by one character without keyboard is there any command which suit my needs ? \
            thanks in advance

            Comment

            • !NoItAll
              Contributor
              • May 2006
              • 297

              #7
              You want the text to appear in a textbox one character at a time just as though someone were typing it in. You need a function to do that. Pass the text and the textbox into the function.

              Code:
                 
               Friend Sub GhostTyper(ByVal TextBox As TextBox, ByVal sText As String)
              
                      For I As Integer = 0 To (sText.Length - 1)
                          TextBox.Text = TextBox.Text & sText.Substring(I, 1)
                          System.Threading.Thread.Sleep(150)
                          TextBox.Refresh()   'you need to refresh after each character for it to actually show up
                      Next
              
                  End Sub
              You can adjust the sleep time for faster or slower entry, or even add a parameter to pass the speed in if you like.

              Comment

              Working...