Solved

presskey with api

Posted on 2000-03-20
4
136 Views
Last Modified: 2008-03-17
I want to simulate a keypress when a window with a certain classID has focus.  I think I get the findwindow(), but I'm having trouble with the keypress.  Sorry, the points are so low, I'm almost out :(
0
Comment
Question by:fibdev
  • 2
  • 2
4 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 10 total points
ID: 2638456
Once the window has focus you can use VB's SendKeys function.
0
 
LVL 3

Author Comment

by:fibdev
ID: 2640607
I can't find SendKeys anywhere in the Win32API?
0
 
LVL 32

Expert Comment

by:Erick37
ID: 2640659
SendKeys is a VB command.

SendKeys "Text to send"

SendKeys "{ENTER}"

You will find it in VB Help.
0
 
LVL 3

Author Comment

by:fibdev
ID: 2640667
Thanks Erick
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now