Solved

Send keys Problem

Posted on 1998-11-18
5
151 Views
Last Modified: 2010-05-03
I am trying to send commands to another program. When sending to a normal form, everything works fine..When sending to the mdi form everything works fine....But when sending to a child in a mdi form nothing happens. How can I send Key commands to a mdi child form.
0
Comment
Question by:edmac
[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
5 Comments
 
LVL 1

Expert Comment

by:can9999
ID: 1445524
1. Use "FindWindowE" API
   -> You can find child window.
   -> If you succeed finding window, it return value not 0.


2. Use "SetWindowPos" API
   -> You can set child window topmost.

3. And then send keys to child window.

* Caution : API Text Viewer  ( in VB )
   -> Don't trust 100% !
   -> Some argument is wrong.
   -> ex) "Byval A as String" is wrong, "Byval A as Long" is right.
   -> If you can't get data though you followed right step,
       try changing declare like above.
 



0
 

Author Comment

by:edmac
ID: 1445525
I don't understand the instructions given. Please be more explicit
0
 
LVL 1

Expert Comment

by:can9999
ID: 1445526
Where ?  




0
 

Author Comment

by:edmac
ID: 1445527
where do I find the FindWindowsE  ?
0
 
LVL 3

Accepted Solution

by:
myqlG earned 200 total points
ID: 1445528
You should NEVER use sendkeys.. it does bad things and is slow
I use keybd_event
its in the API viewer and some support info can be found at
http://techinfo.sybase.com/css/techinfo.nsf/DocId/ID=47760
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

737 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