unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls,DateUtils,Clipbrd,StrUtils;
type
TForm1 =
class(TForm)
Label1: TLabel;
Edit1: TEdit;
Button1: TButton;
Edit2: TEdit;
Edit3: TEdit;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
function getNR(c : char): char;
begin
result := '
';
// Ergebniss initialisieren
case c
of
'
1': result := '
A';
'
2': result := '
B';
'
3': result := '
C';
'
4': result := '
D';
'
5': result := '
E';
'
6': result := '
F';
'
7': result := '
G';
'
8': result := '
H';
'
9': result := '
I';
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var i : INTEGER;
begin
Label1.Caption := '
';
for i := 1
to length(Edit1.text)
do
begin
Label1.Caption := Label1.Caption + getNR(Edit1.Text[i])+'
';
Edit2.Text := Label1.Caption ;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit2.SelectAll;
Edit2.CopyToClipboard;
Edit3.PasteFromClipboard;
Clipboard.Clear;
end;
procedure TForm1.Edit1Change(Sender: TObject);
begin
edit1.text := uppercase(edit1.text);
edit1.SelStart := Length(edit1.text);
end;
end.