×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to create a output wich acts like typing on my keyboard?

How to create a output wich acts like typing on my keyboard?

How to create a output wich acts like typing on my keyboard?

(OP)
Hi,

Can anyone help me with creating a output wich acts like typing on my keyboard?
I'm no advanced VB user, so I couldn't find out on my own.

Henry906
Replies continue below

Recommended for you

RE: How to create a output wich acts like typing on my keyboard?

You could use the Form_KeyPress event. You will need to set the Forms Keypreview property to True

Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting

Steam Engine enthusiasts: www.essexsteam.co.uk

RE: How to create a output wich acts like typing on my keyboard?

Also search for 'SendKeys' in the help docs or on Google. I have not used it myself, but it sounds like what you are after.

Here is a snippet from the msdn library (VB6):

CODE

SendKeys Statement

Sends one or more keystrokes to the active window as if typed at the keyboard.

Syntax

SendKeys string[, wait]

RE: How to create a output wich acts like typing on my keyboard?

cowski

SendKeys is usually used within your VB app to generate keypresses in an external app. Have a look at the instructive  SendKeys example in VBHelp which shows how to send simulated keypresses to Calc.exe

Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting

Steam Engine enthusiasts: www.essexsteam.co.uk

RE: How to create a output wich acts like typing on my keyboard?

It isn't immediately clear to me from the original post where Henry wants to send the output. Depending on the need 'keypress' or 'sendkeys' may be appropriate.

Henry, a little more information will help us help you. What is it you are trying to accomplish? Are you trying to catch keystrokes or send keystrokes to your own program or an external program?

Also, I should clarify a little; I have fiddled with sendkeys example code but I have not had a need for it in one of my own programs.

RE: How to create a output wich acts like typing on my keyboard?

(OP)
my idea was:
a user should type a text like "a sample text"
then press start and the program would send the text over and over , like ctrl + v, but for programs in which that is inpossible, so it would be for external programs, i think that SendKeys will help me a lot

Henry

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close