Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

presskey with api

Posted on 2000-03-20
4
Medium Priority
?
143 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 40 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

610 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