TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: FRANK MALCOLM
date: 1997-06-09 10:06:00
subject: Keystrokes to other apps

How can I send a keystroke to another application? The app in question
has F2 as an accelerator for one of its menu items (which happens to be
the 1st item on the 1st pull-down menu - this may be relevant to a
comment later).
I tried sending wm_keydown, wm_keyup & wm_char messages in various
combinations, but none worked. I know I've got the window handle
correct, because the mouse messages I send work fine.
By using Spy I found that a wm_command was being sent with a wParam of 1
so I tried that - it worked! For that menu item, anyway. Any other value
of the wParam closes the app.
Any clues?
Regards, fIM.
---
 þ * þ If Q were castrated, would he become O?
---
---------------
* Origin: Pedants Inc. (3:712/610.24)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.