Jump to content

Send a key from the textbox Visual Basic ?


 Share

Recommended Posts

Hi did not find much research...

I have AutoItX3.dll and I am using visual basic ...

My problem is from textbox key send and this key press down and press up...

 Send("{a down}") ;Holds the A key down
 Send("{a up}") ;Releases the A key
 

Like the above code, but A will replace the textbox.

Ekran-Alintisi.png

Link to comment
Share on other sites

  • 5 months later...

Are you trying to send the key referred to by the textbox contents? - if so this should work...

 

Dim KeyToSend As String = TextBox1.Text & " down"
AutoItX.Send("{" & KeyToSend & "}")
Threading.Thread.Sleep(1000)
KeyToSend = TextBox1.Text & " up"
AutoItX.Send("{" & KeyToSend & "}")

 

Back up my hard drive? - I can't even find reverse gear.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...