-
Notifications
You must be signed in to change notification settings - Fork 15
/
clipBformunit.pas
57 lines (47 loc) · 1.14 KB
/
clipBformunit.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
unit clipBformunit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons;
type
TclipbForm = class(TForm)
clipBmemo: TMemo;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
loadDialog: TOpenDialog;
procedure FormShow(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
clipbForm: TclipbForm;
implementation
{$R *.DFM}
procedure TclipbForm.FormShow(Sender: TObject);
var
x:word;
begin
If LoadDialog.Execute Then
Begin
ClipBForm.ClipBMemo.Lines.LoadFromFile(LoadDialog.filename);
// Auf maximal 100 Zeilen kürzen
If ClipBForm.ClipBMemo.Lines.Count>100 then
For x:=100 to ClipBForm.ClipBMemo.Lines.Count
do ClipBForm.ClipBMemo.Lines.Delete(100);
End
else modalresult:=mrNo;
end;
procedure TclipbForm.BitBtn3Click(Sender: TObject);
begin
modalresult:=mrNo;
end;
procedure TclipbForm.BitBtn2Click(Sender: TObject);
begin
modalresult:=mrYes;
end;
end.