?
Solved

Send keys Problem

Posted on 1998-11-18
5
Medium Priority
?
153 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 800 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Suggested Courses

801 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