Answer the question
In order to leave comments, you need to log in
Delphi, how to programmatically press a key in someone else's window knowing the handle of the window?
Hello, I've been sitting for hours looking for information on how to press a key in someone else's window (for example, F1) knowing the window handle. The problem is that FindWindow cannot find the window by its title.
How to proceed, what to do?
Answer the question
In order to leave comments, you need to log in
So FindWindow will actually return the Handle, since you already know it - what's the problem?
SendMessage takes the window Handle as the first parameter, the second you pass WM_KEYDOWN, the third - VK_F1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question