How do you simulate keystrokes?

ryodoan

Well-known member
Joined
Jul 16, 2004
Messages
65
Location
Ohio
Programming Experience
3-5
I know you can use VB.net to move the mouse, is there some way you can also use it to simluate keystrokes?

To start this off I am kinda forgetful, lazy, and bored which leads to this programming project. Since I transfered all my cd's into a binder I have lost the serial paper so many times and I get tired of refering to the paper while inputing codes, so I decided to make a program that keeps track of my keys for me and then fills out the form for me.
 
Well, I figured it out on my own it turns out, sorry for wasting forum space, if anyone else is interested in this problem here is the article I found that really helped me:

http://www.codeproject.com/vb/net/screen.asp

Also, just cause I was bored I figured out a really backwards hacked way to find out ASCII codes for characters, I am sure there is a better way but by golly, this works:

Dim thisChar As Char = key.Substring(i, 1)
Hex(thisChar.GetHashCode).ToString).Substring(0, 2)

As I stated above, there probably is a much better way to get the Hex ASCII codes, but since I didnt know the proper way i just fumbled around until I got this.
 
Back
Top