Solved

Send keys Problem

Posted on 1998-11-18
5
145 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
Comment Utility
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
Comment Utility
I don't understand the instructions given. Please be more explicit
0
 
LVL 1

Expert Comment

by:can9999
Comment Utility
Where ?  




0
 

Author Comment

by:edmac
Comment Utility
where do I find the FindWindowsE  ?
0
 
LVL 3

Accepted Solution

by:
myqlG earned 200 total points
Comment Utility
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

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

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

771 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

12 Experts available now in Live!

Get 1:1 Help Now