TTouchKeyboard: send keystroke to another program?

How to use TTouchKeyboard in Delphi so that it can send keystrokes to another program. For example, I want to enter a password in a browser using the TTouchKeyboard component. I have no idea how to make the browser stay in focus while I click on my keyboard.

+5
source share
1 answer

TTouchKeyboardsend keys to the current management focus, so if you have TEdita focus , the TEdit get the key ...

You can create a form containing TTouchKeyboardand add this procedure:

  protected
    procedure CreateParams(var Params: TCreateParams); override;

...

procedure TForm1.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  with Params do
  begin
    ExStyle   := ExStyle or WS_EX_NOACTIVATE;
    WndParent := GetDesktopwindow;
  end;
end;

... . ( , : -)

+10

All Articles