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