Article

From:
To:
All
Subject:
Delphi: simulate keyboard
Newsgroup:
borland.public.install.delphi

Delphi: simulate keyboard


Hello,

I want to simulate a keypress-event for an application. The background is to get keyboard on crt build of buttons for use on a touchscreen system without any hardware-keyboard.
My idea is to simulate a keypress-event. So I desided to use the keypress-procedure of TWinControl which generates an OnKeyPress event.
Is it possible to read the first Char of TButton.Caption and send it via keypress-event to a TEdit.text. My idea is to
procedure TForm1.Button1Click(Sender : TObject); VAR myChar : Char; begin   if (Sender is TButton) then begin     Edit1.setFocus;     myChar := (Sender as TButton).Caption[1];
    KeyPress(myChar); { ???????? }
  end; end;
Has anyone an idea for this problem????? Thanks a lot!
Alex

Message source

FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Sun, 19 May 2024 22:50:55 UTC
Copyright © 2009-2024
HREF Tools Corp.