-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathumyshowmessage.pas
66 lines (49 loc) · 1.26 KB
/
umyshowmessage.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
58
59
60
61
62
63
64
65
66
// Copyright 2017, Kaj Mikkelsen
// This software is distributed under the GPL 3 license
// The full text of the license can be found in the aboutbox
// as well as in the file "Copying"
unit UMyShowMessage;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TFMyShowMessage }
TFMyShowMessage = class(TForm)
Button1: TButton;
CB1: TCheckBox;
Message: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
FMyShowMessage: TFMyShowMessage;
implementation
uses
mylib;
{$R *.lfm}
{ TFMyShowMessage }
procedure TFMyShowMessage.FormCreate(Sender: TObject);
begin
RestoreForm(FMyShowMessage);
end;
procedure TFMyShowMessage.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
if CB1.Checked then
PutStdIni('Messages', message.Caption, 'False');
end;
procedure TFMyShowMessage.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TFMyShowMessage.FormDestroy(Sender: TObject);
begin
SaveForm(FMyShowMessage);
end;
end.