Solved

Send keys Problem

Posted on 1998-11-18
5
150 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
  • 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

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…
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 …
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…

820 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