1 .
Delphi , , , .. . Delphi. , .
2 .
:
Program <>;
< , , >
Begin
< >
End.
Delphi , , . Delphi :
Program Project1;
Uses
Forms,
Unit1 in Unit1.pas,
Unit2 in Unit2.pas;
{$R *.RES}
Begin
Application.Initialize;
Application.CreateForm(Tform1,Form1);
Application.CreateForm(Tform2,Form2);
Application.Run;
End.
. dpr. , Project View Source. Program, , . , . Uses : Forms Unit1.pas Unit2.pas. {$R *.RES}, , - . : , , . , , , res. , . , , Resource Workshop. Image Editor, Tools Image Editor.
Begin End. .
, . .
Unit Project1;
Interface
Uses
Windows, Messeges, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StrCtrls;
Type
TForm1=class(TForm)
Edit1:TEdit;
Label1:TLabel;
Button1:TButton;
Procedure Button1Click(Sender:TObject);
Private
{Private declarations}
public
{ public declarations}
end;
Var
Form1:TForm1;
|
|
Implementation
{$R*.dfm}
Procedure Tform1.Button1Click(Sender:TObject);
Var
Begin
end;
End.
Unit, . uses .
:
- ;
- ;
- .
( interface) , . ( uses) , . , Type.
Implementation , , .
{$ R *. dfm }, , . dfm, . .
{$ R *. dfm } . .
( ). ( ) begin end. , begin .
, . , ( type). .
( . . , - exe-.)
3:
- , . , () OnClick Form1. .
- , . . . .
- , . , , . .
- , , !. 14 . . 16 .