unit Utextreme;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Menus, StdCtrls;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    MainMenu1: TMainMenu;
    Datei1: TMenuItem;
    Speichern1: TMenuItem;
    Laden1: TMenuItem;
    Neu1: TMenuItem;
    Bearbeiten1: TMenuItem;
    SuchenErsetzen1: TMenuItem;
    lschen1: TMenuItem;
    kopieren1: TMenuItem;
    einfgen1: TMenuItem;
    Close1: TMenuItem;
    OpenDialog1: TOpenDialog;
    SaveDialog1: TSaveDialog;
    procedure Close1Click(Sender: TObject);
    procedure Speichern1Click(Sender: TObject);
    procedure Laden1Click(Sender: TObject);
    procedure Neu1Click(Sender: TObject);
    procedure lschen1Click(Sender: TObject);
    procedure kopieren1Click(Sender: TObject);
    procedure einfgen1Click(Sender: TObject);
    procedure SuchenErsetzen1Click(Sender: TObject);
    
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;


implementation

uses utextreme2;

{$R *.DFM}

procedure TForm1.Close1Click(Sender: TObject);
begin
close;
end;

procedure TForm1.Speichern1Click(Sender: TObject);
begin
savedialog1.defaultext:='txt';
savedialog1.filter:='Textdatei (*.txt)|*.txt|Alle (*.*)|*.*';
if savedialog1.Execute then memo1.lines.savetofile(Savedialog1.filename);
end;

procedure TForm1.Laden1Click(Sender: TObject);
begin
opendialog1.defaultext:='txt';
opendialog1.filter:='Textdatei (*.txt)|*.txt|Alle (*.*)|*.*';
if opendialog1.Execute then memo1.lines.loadfromfile(opendialog1.filename);
end;

procedure TForm1.Neu1Click(Sender: TObject);
begin
memo1.clear;
end;

procedure TForm1.lschen1Click(Sender: TObject);
begin
memo1.clearselection;
end;

procedure TForm1.kopieren1Click(Sender: TObject);
begin
memo1.copytoclipboard;
end;

procedure TForm1.einfgen1Click(Sender: TObject);
begin
memo1.pastefromclipboard;
end;

procedure TForm1.SuchenErsetzen1Click(Sender: TObject);
begin
form2.show;
end;



end.
