Hallo
vergleiche mal hiermit:
Delphi-Quellcode:
unit frmMain;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 =
class(TForm)
Label1: TLabel;
Edit1: TEdit;
Button1: TButton;
Edit2: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
CL : TStringList;
I : Integer;
S :
String;
begin
CL := TStringList.Create;
try
for I := 1
to Length(Edit1.Text)
do
if CL.IndexOf(Edit1.Text[I]) = -1
then CL.Add(Edit1.Text[I]);
for I := 0
to CL.Count - 1
do S := S + CL.Strings[I];
Edit2.Text := S;
finally
CL.Free;
end;
end;
end.
Viele Grüße und Erfolg, sowie gutes Gelingen
wünscht
Alter Mann
PS die 'anderen' waren schneller, trozdem für's Vertsändnis.