Autor Beitrag
AlexII
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 180



BeitragVerfasst: So 04.05.08 17:32 
Hallo DelphiGemeinde!

Ich habe vor folgendes zu machen.

In dem RichEdit1 wird Text geschrieben, mittels OnKeyPress muss der Text in der RichEdit2 simuliert bzw. mit geschrieben werden. Wie erreiche ich das? Hab bis jetzt keine Idee. Brauche paar Tipps...
Jakob_Ullmann
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1747
Erhaltene Danke: 15

Win 7, *Ubuntu GNU/Linux*
*Anjuta* (C, C++, Python), Geany (Vala), Lazarus (Pascal), Eclipse (Java)
BeitragVerfasst: So 04.05.08 17:46 
Wenn du die Tasten simulieren willst (warum auch immer):

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure TForm1.RichEdit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  RichEdit2.SetFocus;
  keybd_event(Key, 0, 0, 0);
  RichEdit1.SetFocus;
end;

procedure TForm1.RichEdit1KeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  RichEdit2.SetFocus;
  keybd_event(Key, 0, KEYEVENTF_KEYUP, 0);
  RichEdit1.SetFocus;
end;


Ohne Garantie auf Richtigkeit.
AlexII Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 180



BeitragVerfasst: Mo 05.05.08 14:32 
Danke!