当前位置:网站首页>[1. Delphi foundation] 1 Introduction to Delphi Programming
[1. Delphi foundation] 1 Introduction to Delphi Programming
2022-07-06 07:34:00 【Janeb1018】
1.DelphiXE Introduction to programming
1.1Delphi brief introduction
Delphi, yes Windows Platform under the famous rapid application development tool (Rapid Application Development, abbreviation RAD). Its predecessor , That is DOS For a time “Borland Turbo Pascal”, The earliest version was made in the United States Borland( Bao LAN ) The company 1995 Annual development . The main creator is Anders Hejlsberg. After years of development , This product is also transferred to Embarcadero It's part of the company .
Delphi It's an integrated development environment (IDE), The core of use is traditional Pascal Language develops from Object Pascal, Take the graphical user interface as the development environment , through IDE、VCL Tools and compilers , With the function of linking database , Constitute an application development tool centered on object-oriented programming .
from Borland company-launched Delphi Is a new visual programming environment , It provides us with a kind of convenience 、 shortcut Windows Application development tools . It has been used. MicrosoftWindows Many advanced features and design ideas of graphical user interface , It adopts a flexible and reusable complete object-oriented programming language (Object-Oriented Language)、 The fastest compiler in the world today 、 The most advanced database technology . For the vast number of program developers , Use Delphi Develop application software , Undoubtedly, it will greatly improve the programming efficiency , And with the deepening of application , You will find that programming is no longer a boring job ——Delphi Every design detail of , Will bring you a joy .
1.2DelphiXE Software features
Develop highly connected Apps
Various modern devices ( equipment ) Every day is increasing at an alarming rate . Current mobile 、 The tablet 、 Wearable devices and the fast-growing internet of things .RAD Studio Provided in a single RAD Studio The development environment is a solution that allows developers to keep up with trends .
Develop high-performance native applications
It can quickly develop efficient and linked enterprise databases 、 Cloud services 、 Native applications for sensing devices and various devices .
all-new FireUI Multi device designer (Multi-Device Designer)
Let your team develop with a single code in a very short time PCs、 The tablet 、 Smart phones and even wearable devices such as Google Glass Native application of . With a common main form and what the device needs views, It can develop multiple platforms and devices at the same time apps, Give Way APP And can be listed quickly . Just maintain a common code without sacrificing the Nativity of the platform .
New powerful parallel execution Library ( Parallel Programming Library)
Give developers incredible code parallel execution ability , Significantly improve performance .
new Bluetooth App Tethering
XE Support Bluetooth and low power consumption Bluetooth (BLE), Give Way App Tethering Can support at the same time WIFI And blue buds . Let you have Windows Applications can be extended more widely .
new Enterprise Mobility Services (EMS)
Powerful EMS Intermediary technology ,EMS Allows developers to easily develop REST / JSON Enterprise class mobile multi tier application architecture based on . Quickly deploy new EMS To publish and manage APIs、 Enterprise information .
Use... With ease REST and BaaS Suppliers connect to popular cloud services
such as , Push notification 、 verification 、 Storage and other services
Make it easy and fast Web application development
uniGUI Web The application framework will Web The application development experience extends to a new level .uniGUI send Delphi Developers can use a unique set of visual components in IDE Created in , Design and commissioning Web Applications . Each component is designed to provide a connection with Delphi VCL The same functions as the corresponding visual components in . This provides a very comfortable development environment , Very close to the original VCL Application development , Have a simple learning curve . uniGUI Web An application can use one of the available deployment options ( Such as Windows service , Stand alone server or ISAPI modular ) Deploy to server .
1.3DelphiXE Introduction to programming
Use Delphi General steps for writing applications :
New application
Set form properties
Add interface components
Set component properties
Add component events
Write event response code
Compile and run the application
Introductory example : Place three buttons on the form , Namely “ Zoom in ”、“ narrow ”、“ close ”, Enlarge the form respectively 、 Zoom out and close the functions of the application .
1. New application
start-up DelphiXE, choice “File”->"New"->"VCL Forms Application".
2. Set form properties
Put the form's Caption Property is set to “ first Delphi forms ”.
3. Add interface components
take TButton Component added form , find TButton Double click or drag the component onto the form .
4. Set component properties
Will all TButton The properties of components are set according to the following table :
object | attribute | Property value | explain |
---|---|---|---|
Button1 | caption | Zoom in | The title of the button |
Button2 | caption | narrow | The title of the button |
Button3 | caption | close | The title of the button |
5. Add component events
Select the component Button1, Select... In the object viewer Events tab , stay OnClick To the right of Button1Click Back carriage return , The same way to set Button2、Button3 Events .
If you use the default event handler name , It can also be in OnClick Double click on the right side of .
6. Write component event response code
The code is as follows :
procedure TForm1.Button1Click(Sender: TObject); begin Form1.Height := Form1.Height + 10; Form1.Width := Form1.Width + 10; end; procedure TForm1.Button2Click(Sender: TObject); begin Form1.Height := Form1.Height - 10; Form1.Width := Form1.Width - 10; end; procedure TForm1.Button3Click(Sender: TObject); begin close; end;
7. Compile and run the application
Click... Above the toolbar “Run” button . The operation effect is as follows :
边栏推荐
猜你喜欢
If Jerry's Bluetooth device wants to send data to the mobile phone, the mobile phone needs to open the notify channel first [article]
Ble of Jerry [chapter]
Three no resumes in the software testing industry. What does the enterprise use to recruit you? Shichendahai's resume
leecode-C語言實現-15. 三數之和------思路待改進版
TS 类型体操 之 循环中的键值判断,as 关键字使用
[MySQL learning notes 30] lock (non tutorial)
成为优秀的TS体操高手 之 TS 类型体操前置知识储备
ORACLE列转行--某字段按指定分隔符转多行
mysql如何合并数据
Multi attribute object detection on rare aircraft data sets: experimental process using yolov5
随机推荐
杰理之如若需要大包发送,需要手机端修改 MTU【篇】
Luogu p4127 [ahoi2009] similar distribution problem solution
Typescript void base type
Get the path of edge browser
Typescript interface properties
合规、高效,加快药企数字化转型,全新打造药企文档资源中心
Luogu p1836 number page solution
Jerry's ad series MIDI function description [chapter]
Ble of Jerry [chapter]
Google may return to the Chinese market after the Spring Festival.
The differences and advantages and disadvantages between cookies, seeion and token
学go之路(二)基本类型及变量、常量
Cf1036c class numbers solution
Word delete the contents in brackets
洛谷P4127 [AHOI2009]同类分布 题解
Simulation of holographic interferogram and phase reconstruction of Fourier transform based on MATLAB
The difference between TS Gymnastics (cross operation) and interface inheritance
CF1036C Classy Numbers 题解
可变参数重载时的内存错误
杰理之BLE【篇】