Solved

Send keys to an hWnd

Posted on 2004-09-22
4
202 Views
Last Modified: 2010-05-02
How can I silently send keys to a window (given the hWnd).  The window may or may not be visible.

For example, how can I send the string "test" followed by hitting the enter key to the window hWnd?

Thanks,
-Sam
0
Comment
Question by:samsonite1023
4 Comments
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 12130145
Try use SendMessage or PostMessage API.

Some relevant info:
http:Q_20112674.html
http:Q_20757153.html
http:Q_20517620.html
http:Q_20099013.html
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question