unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br> StdCtrls;<br><br>type<br> TForm1 = class(TForm)<br> Edit1: TEdit;<br> Edit2: TEdit;<br> procedure Edit1KeyPress(Sender: TObject; var Key: Char);<br> procedure FormShow(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);<br>begin<br> if key <> #13 Then<br> begin<br> Edit2.Text := Edit2.Text + key;<br> key := #0;<br> end<br> else<br> Edit1.Text := Edit2.Text;<br>end;<br><br>procedure TForm1.FormShow(Sender: TObject);<br>begin<br> Edit1.SetFocus;<br>end;<br><br>end.