-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnit3.pas
More file actions
67 lines (57 loc) · 1.24 KB
/
Copy pathUnit3.pas
File metadata and controls
67 lines (57 loc) · 1.24 KB
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
67
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Button1: TButton;
Button2: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Memo1: TMemo;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
class function Open(const custcode, custName, custemail:string):string;
end;
implementation
{$R *.dfm}
class function TForm1.Open(const custcode, custName, custemail:string):string;
var
Form1: TForm1;
begin
Form1:= TForm1.Create(nil);
try
with form1 do
begin
Edit1.Text := custcode;
Edit2.Text := custName;
Edit3.Text := custemail;
if ShowModal=mrOk then
Result:= 'Hello from DLL! e mail Sended!'
else Result:= '';
end;
finally
Form1.Free;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ModalResult:= mrOk;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ModalResult:= mrCancel;
end;
end.