, Delphi Object Pascal. . Object Pascal Microsoft Windows. Windows Object Pascal Delphi. Delphi . Delphi (Visual Component Library, VCL).
, Delphi Windows. Delphi. Delphi. , , , . TObject. , , - : , .
Delphi :
- ADO (ActiveX Data Object). BDE (Borland Database Engine), ;
- Data Module Designer ( ). ;
- InterBase Express. InterBase . BDE ;
- MIDAS. Delphi MIDAS ;
- CORBA. CORBA VisiBroker C++ ORB 3.32. CORBA ;
- . , ;
- VCL (Visual Component Library). VCL , , Web ;
- (Frames). , ;
- ;
- To-Do. , ;
- . ;
- . , ;
- (Project Manager). . , , . , , RES ;
- ActiveX. ;
- (Wizards). Windows ;
- . Tools/Editor Options (/ );
-
- . (DFM) , , . ;
- . Delphi, , , , (Autocreated Forms). Delphi , , (Available Forms), ;
- IDE. Delphi IDE , . , , , , log- .;
- . , (Integrated Translation Environment), ;
- NetMaster. NetMaster , FastNet.
Delphi Enterprise, - . .
(Data Module Designer) . , (. 1.1). File/New/Data Module (// ).
(Data Diagram), , "-", CASE-. . , - TDataSet (, TDataSource), . , , . TDataset, , .
, Delphi -Do - , .
. 1.1.
To-Do , . , Delphi View/To-Do List (/ ). (. 1.2) , , .
. 1.2. -Do
, <Ctrl>+<Shift>+<T>. (. 1.3).
, To-Do , :
{ TODO 1 : }
. 1.3.
TODO. To-Do . , , , . , , , :
{ DONE 1 : }
To-Do .
Delphi . . , . , , Delphi, (Integrated Translation Environment), . , , . Delphi Project/Languages/Add (//), (. 1.4), , , - ().
, (Translation Manager) (. 1.5).
, . , . , caption text, . (Buttoni. Caption Button2. Caption): "Yes" "No" "", "" . (Formi. caption) "". Delphi Project/Language/Set Active (// ) . , (. 1.6).
. 1.4. Add Languages
. 1.5. Translation Manager
. 1.6.
(VCL) Delphi . :
- TApplicationEvents. Delphi TAppiication , TAppiication. Delphi . ( . ) TAppiication, , , Delphi;
- TAppietAppiication. Windows, CPL, Delphi 5 TAppietAppiication. - TAppletModuie, Windows. Delphi File/New/Control Panel Application (Module) (// );
- TTooiBar TListview. (onAdvancedCustomDrawItem, OnAdvancedCustomDraw,
.). , , ;
- . - TList: TObjectList, TComponentList TciassList. - , . Delphi 5 TObjectQuery TObjectstack, .
Delphi 5 (frames). - , , ( , ) , , . Delphi File/New Frame (/ ). , Frames . , Delphi . , -. , .
.
Delphi . . Delphi 5 . InterBase Express. , IB Database 5.5 . API, BDE.
- ADO (ActiveX Data Objects). ADO . ADO - -, OLE DB . - Microsoft. ADO- BDE. Delphi 5, ADO, - TFields, , ADO.
, , BDE. Delphi, TDatabase Execute, SQL- TQuery.
, , Delphi , COM. Delphi 5, , - . TOLEServer , . - . - , . - 3.
, , . , . Delphi . Delphi .
. Delphi " ". Delphi 5 (6).
Delphi (), :
- (Main Window); - (Form Designer); - (Object Inspector); - (Code Editor).
(. 1.7). Windows : , .
. 1.7. Delphi
Delphi . - Delphi. , , , Delphi . , . Delphi " ", , Open Project ( ) <Ctrl>+<Fll>.
, ( Desktop ) . .
(Standard) , .
(View) . (Debug) . (Custom) .
(Desktop) - , . Delphi. Delphi . , , (debug desktop) . : Save current desktop ( ) Set debug desktop ( ). Delphi\Bin DST.
. 1.8.
. 1.9. Commands
, Customize (. 1.8). , , Delphi View/Toolbars/Customize (/ /).
: Toolbars ( ), Commands () Options ().
Toolbars (. 1.8) .
Commands (. 1.9) , , , . . , , .
Commands .
, Options (. 1.10) (tips) .
. 1.10. Options
(Show tooltips) . , " ", , .
Delphi , . . Palette Properties ( ). , Delphi Component/Configure Palette (/ ). :
- Standard ( , , . .);
- Additional ( , , . .);
- Win32 ( 32- Windows);
- System ( , , . .);
- Data Access ( BDE); - Data Controls ( );
- ADO ( ActiveX);
- Interbase ( Interbase);
- Midas ( );
- InternetExpress ( , Web- );
- Internet ( Web- Internet);
- FastNet ( Internet);
- Decision Cube ( );
- QReport ( );
- Dialogs ( Windows, Save, Open, Print . .);
- Win 3.1 ( Windows 3.1 , Delphi Windows 3.1);
- Samples ( , );
- ActiveX ( ActiveX);
- Servers ( -).
, , .
, , - , .
(. 1.11) Delphi Windows, . (Form). . , . (. . 1.6).
, (Object Inspector) (. 1.12).
: - , ; - ; - .
. 1.11.
. 1.12. ( Object Inspector, Properties)
(Properties) (Events).
, . . . 1.12 Form 1.
(Properties) . . Properties, . "+", . . "+" "-".
( "+") "-". Windows,
"...", . .
, , , . .
, Delphi API, , , . , Color , . , .
, Arrange/by category (/ ). (Properties) , . 1.13.
. 1.13. ,
, "+" . , : , View (). , , . , Legacy .
, . Delphi ( , <Shift>, ). , . - , .
(Events) (. 1.14) ( ), , . . .
On.
- - (event handler), . . , -.
. 1.14. Events
, . -. , - .
- , :
- ;
- ; .
. Delphi Tools/Environment Options (/ ).
, Delphi () . Unit1.
, (Unit2, Unit3 . .). (Unit) Delphi File/New/Unit (//). , Delphi , . . - .
, . , . : (Code Browser) (Code Explorer).
. 1.15. Code Editor
, . " " , . Delphi Tools/Editor Options (/ ). (Editor Properties) (. 1.16). : General (), Display (), Key Mappings ( ), Color (), Code Insight ( ).
, .
. ,
. Delphi View/Code Explorer (/ ) .
P. 1.16. Editor Properties
, , , , , . , uses.
. (. 1.17).
. 1.17.
, <Ctrl>+<Shift>+<E>.
. , , , ( ) . . (implementation) . , , .
() New/Rename (/).
(Environment Options) (. 1.18). Delphi Tools/ Environment Options (/ ).
. 1.18. Environment Options
Delphi Object Pascal. - ,
Delphi File/New/Project (//). , , - Object Pascal ( 1.1).
1.1
unit Unitl;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; type
TForml = class(TForm)
private
{ Private declarations }
public
( Public declarations }
end; var
Forml: TForml;
implementation
{$R *.DFM}
end.
1.1 . "" . - Unit1. , . Delphi , system, Sysutiis . Delphi DCU (Delphi Compiled Unit).
, ( 1.2).
1.2
unit ;
interface
{ }
uses
{ };
const
{ };
type
{ };
var
{ };
{ , };
{ , };
implementation
{ }
uses
{ };
const
{ };
type
{ };
var
{ };
{ };
{ };
{ };
initialization
{ }
{, };
finalization
{ }
{, };
end.
- (interface), "" . , , , , , , , , . , . - .
- (implementation), , , , , , . , - , :
{$R *.DFM}.
- - . {$ }. . , - .
: , . . Compiler () Project Options ( ), Delphi Project/Options (/). , , , , <Ctrl>+<O>, - <>. , , ( 1.3).
1.3
{$A+,B-,C+,D+,E-,F-,G+,H+,I+,J+,K-,L+,M-,
N+,0+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE$00100000}
{$IMAGEBASE $00400000}
($APPTYPE GUI)
:
- ;
- ;
- /;
- , ;
- ;
- ;
- ;
- ;
- .
. :
{$If }
{ };
{$EndIf}
{$If }
{ };
{$Else}
{ };
{$EndIf}
, , $If, , $If, - . , - , - , $Else.
. :
{$IfDef }
, . , . , , , , .
:
{$Define }
:
{$UnDef }
$IfDef $IfNDef.
, .
. , , . :
($IfDef Debug}
{$EndIf}
{$Define Debug}
. , :
//{$Define Debug}
{$Undef Debug}
.
. Assert, . Assert
, , - . , EAssertionFaiied , .
.
:
{$+} ($ASSERTIONS ON}
{$-} ($ASSERTIONS OFF}
.
/ . :
{$I+} {$IOCHECKS ON}
{$I-} {$IOCHECKS OFF}
/ ( {$I+} ($IOCHECKS ON}) / EinOutError. {$I-} {$IOCHECKS OFF}, .
, , , . . . .
{$ , }
($MINSTACKSIZE } ($MAXSTACKSIZE }
. Windows ,
. , , Windows .
1024 2147483647. , 2147483647.
, , , . , EStackOverflow.
(RunTime Type Information, RTTI). :
{$+} {$TYPEINFO ON}
{$-} {$ TYPEINFO OFF}
(+, -, *, Abs, sqr, Succ, Pred, Inc Dec). :
{$Q+) {$OVERFLOWCHECKS ON}
{$Q-} {$OVERFLOWCHECKS OFF}
{$Q+} . , EIntOverfiow. . , . . . .
, .
. :
{$R } {$RESOURCE }, - .
, DFM RES, . , ( 1.1) Delphi {$R -dfm}, .
{$R .dfm}, . ., , Delphi EResNotFound.
. :
{$R+} {$RANGECHECKS ON)
{$R-} {$RANGECHECKS OFF}
, , . {$R+}, . , ERangeError. , , {$R+} . .
, DOS. . :
($APPTYPE CONSOLE}
. Delphi Project/Options (/) Linker ( ) Generate Console Application ( ).
. (initialization) , , .
(finalization). , .
Delphi. (Button1) ( Standard). Buttoni (). - ! (Name) ( ) , . Delphi , ( ) . , , Buttoni. Name , caption. . . . (, ).
, . -, (uses) StdCtrls - . , ( Button1). -, :
Button1: TButton;
, TButton ( . ). , TFom1, . . . (unit), : Form1. Button1. , .
- , (Events) . , . OnClick. , Delphi - ( ). Formi:
Forml.Close;
, - <F9> Run/Run (/). , () .
Delphi Object Pascal. Object Pascal Pascal , Object Pascal . (VCL) , Object Pascal (IDE) Delphi. . . , - .
, ? - , , - - . - (), - , . - . , , Pascal. , ( ). , .
- . (field) . , , , . (methods). (properties) . Delphi , ( ). - . , . , - . , ( ). -
, . , - , . , - , . , - ( , , ).
Delphi , . .
:
type = class (-)
{ } private
{ } protected
{ } public -
( } published
{ } end;
- ( ), - - , , - . . : private, protected, public published. , . private. protected , a public published - . ,
published property Color: TColor read GetColor write SetColor;
color , (published), . . .
, , , , , :
published property Color: TColor read GetColor write SetColor; property BackColor: TColor read GetBackColor write SetBackColor;
- Color BackCoior - .
.
- Private () - , , , . , , .
- Protected () - , , , , , - .
- Public () - , , .
- Published () - , , public-. , (RTTI). , Delphi . Delphi RTTI (*.DFM), . , (overload) , .
, (interfaces), ( . ).
Delphi . . , , . Delphi TObject. TObject - . , Delphi. TObject :
- , , ;
- ; - .
, Delphi - TObject. TObject, TObject. TObject, , TObject (. . ).
-. - , - - .
( ) , , - TObject.
TComponent. , . TComponent , :
- ;
- ;
- ;
ActiveX .
( ), TForm TSpeedButton,
TControl.
. 1.19 . ,
TControl.
, . ( ) , .
, Delphi
TWinControl, TCustomEdit TBaseArray.
. 1.19. (VCL) Delphi
Delphi . Object Pascal, () . , , . , , ( 1.4).
1.4
procedure TForml.ButtonlClick(Sender: TObject); begin
Color := clGray;
Buttonl.Color := clTeal; end;
1.4 , Buttonl, Delphi. Delphi 5 Enterprise.
1.4 Onclick
Color := clGray;
Forml.Color := clGray;
, . . Button1Click TForm1.
1.4 Buttonl, , .
Delphi . , , , , :
Form2.Buttonl.Color := clTeal;
, ( ), :
Form2.Editl.Clear;
, Form2
(unit2) 1 (unit1) uses
uniti Unit2:
implementation
uses Unit2;
, Delphi, , .
, TEmployee. , , , , Name, Title salary. : calculateSalary. ( 1.5):
1.5
type
TEmpioyee = class(TObject) private
FName: string;
FTitle: string;
FSalary: Double; public
property Name: string read FName write FName;
property Title:, string read FTitle write FTitle;
property Salary: Double read FSalary write FSalary;
function CaicuiateSaiary: Double; end;
, TObject, , TObject TEmpioyee.
1.5 : (interface) (implementation). TEmployee Create, TObject:
var
Employee: TEmployee; begin
Employee := TEmployee.Create; end;
Create (constructor) , .
, , . , .
Destroy, TObject. , :
Employee.Free;
Delphi, . - . . Delphi, , .
- Standard (. 1.20) :
Frames () - , , ;
MainMenu ( ) - . MainMenu (Menu Designer);
FopupMenu ( ) - ,
. , ;
Label () - , ;
Edit ( ) - , ;
Memo ( ) - , ;
Button () - , - ;
checkBox () - , "" "". ;
RadioButton () - , , , ;
ListBox () - ;
ComboBox ( ) - , . ;
ScrollBar ( ) - , ;
GroupBox () - , , ;
RadioGroup ( ) - , ;
Panel () - , . ;
ActionList ( ) - , .
. 1.20. Standard
. 1.21. Additional
- Additional (. 1.21) :
BitBtn ( ) - , ;
SpeedButton ( ) - , ( ). ;
MaskEdit ( ) - , , , ( );
StringGrid ( ) - , ;
DrawGrid () - - ;
Image () - , ;
Shape ( ) - (, , , , );
Bevel () - ( );
ScrollBox ( ) - , . , ;
CheckListBox ( ) - , , , ;
Splitter () - , , ;
StaticText ( ) - , , , ;
ControlBar ( ) - , ;
ApplicationEvents ( ) - , ;
Chart () - - (. ).
- Win32 (. 1.22) :
TabControl () - , (, Delphi );
PageControl () - (, (Project Options) Delphi);
ImageList ( ) - , , ;
RichEdit ( ) - , RTF (Rich Text Format), , , , , , . .;
TrackBar () - , - . ;
ProgressBar ( ) - , - ;
UpDown ( ) - , - ;
HotKey ( ) - " ", ;
Animate () - , AVI (Audio Video Interleaved);
DateTimePicker ( ) - , , ;
. 1.22. Win32
MonthCalendar () - , . ;
Treeview () - ;
Listview () - ;
Headercontrol () - , ;
StatusBar ( ) - , ;
ToolBar ( ) - , , ;
CoolBar ( ) - ;
PageScroller ( ) - , , .
. 1.23. System
- System (. 1.23) :
Timer () - , OnTimer ;
PaintBox ( ) - , , Delphi;
MediaPlayer () - - ;
OleContainer ( OLE) - OLE;
DdeClientconv ( DDE) - (Dynamic Data Exchange, DDE);
DdeClientItem ( DDE) - DDE, ;
DdeserverConv ( DDE) - DDE;
DdeServerItem ( DDE) - DDE, .
( , ) .
, . . , .
5. , .
- , ( ):
Height () - , ;
Width () - , ;
T () - ;
Left ( ) - ;
- , :
BorderStyle ( ) - , ;
Color () - ;
BevelKind ( ) - ( ), ;
Font () - , , , ;
- - , , . Parent, ParentFont, ParentshowHint . . , Button, Form. , ParentFont true. ,
Font Font Button. Font , , , , parentFont false;
- - , :
Caption () - , ( ). , (&). , <lt>+< >;
TabOrder ( ) - <b>. , Tabstop true;
TabStop ( <b>) - , <b>. true <b> , TabOrder ;
- drug-and-drop - , :
DragMode ( ) - , . , dmManual. BeginDrag, . DragMode dmAutomatic, ;
DragCursor ( ) - , .
10.11.2021 - 12:37: - Personalias -> WHO IS WHO - - _. 10.11.2021 - 12:36: - Conscience -> . ? - _. 10.11.2021 - 12:36: , , - Upbringing, Inlightening, Education -> ... - _. 10.11.2021 - 12:35: - Ecology -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> - _. 10.11.2021 - 12:34: , - War, Politics and Science -> . - _. 10.11.2021 - 12:34: , , - Upbringing, Inlightening, Education -> , - _. 10.11.2021 - 09:18: - New Technologies -> , 5G- - _. 10.11.2021 - 09:18: - Ecology -> - _. 10.11.2021 - 09:16: - Ecology -> - _. 10.11.2021 - 09:15: , , - Upbringing, Inlightening, Education -> - _. 10.11.2021 - 09:13: , , - Upbringing, Inlightening, Education -> - _. |