Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Visual Basic only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Visual Basic
Make Visual Basic to press a key
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Virox
New Member
Join Date:
Jul 2007
Posts:
2
#1
Make Visual Basic to press a key
Jul 13 '07, 01:33 AM
I don't know how to make visual basic press a key using code, can someone help me?!
Killer42
Recognized Expert
Expert
Join Date:
Oct 2006
Posts:
8429
#2
Jul 13 '07, 02:35 AM
It sounds as though you're probably looking for the SendKeys function. How it works depends on what version of VB you are using, but check your documentation.
Comment
Post
Cancel
Mague
New Member
Join Date:
May 2007
Posts:
137
#3
Jul 13 '07, 06:53 AM
Most the time all you have to do is put this code
Code:
sendkeys(string)
I found for some reason this didnt work on my visual studio 2005 so if it doesnt try this
Code:
sendkeys.send(string)
Hope this helped
Mague
Comment
Post
Cancel
hariharanmca
Top Contributor
Join Date:
Dec 2006
Posts:
1977
#4
Jul 13 '07, 08:04 AM
Originally posted by
Virox
I don't know how to make visual basic press a key using code, can someone help me?!
Code:
strKey = "{<Key Name>}" in VB 6.0 sendkeys strKey
This will do. Just throw the versions in the questions that you are using .
Comment
Post
Cancel
Virox
New Member
Join Date:
Jul 2007
Posts:
2
#5
Jul 14 '07, 01:09 AM
Thanks a lot, that was what i was looking for.
I use visual basic 6
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment