Solved

presskey with api

Posted on 2000-03-20
4
133 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
Comment Utility
Once the window has focus you can use VB's SendKeys function.
0
 
LVL 3

Author Comment

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

Expert Comment

by:Erick37
Comment Utility
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
Comment Utility
Thanks Erick
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

728 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

10 Experts available now in Live!

Get 1:1 Help Now