当前位置:网站首页>[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 :
边栏推荐
- [computer skills]
- Bugku CTF daily question: do you want seeds? Blackmailed
- Get the path of edge browser
- Jerry's general penetration test - do data transmission with app Communication [article]
- 软件测试界的三无简历,企业拿什么来招聘你,石沉大海的简历
- Comparison of usage scenarios and implementations of extensions, equal, and like in TS type Gymnastics
- Seriously recommend several machine learning official account
- 位运算异或
- [MySQL learning notes 30] lock (non tutorial)
- The way to learn go (I) the basic introduction of go to the first HelloWorld
猜你喜欢
学go之路(一)go的基本介绍到第一个helloworld
【MySQL学习笔记32】mvcc
datax自检报错 /datax/plugin/reader/._drdsreader/plugin.json]不存在
Three no resumes in the software testing industry. What does the enterprise use to recruit you? Shichendahai's resume
智能终端设备加密防护的意义和措施
opencv学习笔记八--答题卡识别
Set picture annotation in markdown
成为优秀的TS体操高手 之 TS 类型体操前置知识储备
Ali's redis interview question is too difficult, isn't it? I was pressed on the ground and rubbed
杰理之开发板上电开机,就可以手机打开 NRF 的 APP【篇】
随机推荐
Typescript void base type
Redis builds clusters
C # connect to SQLite database to read content
[JDBC] quick start tutorial
洛谷P4127 [AHOI2009]同类分布 题解
GET/POST/PUT/PATCH/DELETE含义
After the hot update of uniapp, "mismatched versions may cause application exceptions" causes and Solutions
TypeScript 函数定义
【线上问题处理】因代码造成mysql表死锁的问题,如何杀掉对应的进程
Introduction to the basics of network security
[MySQL learning notes 32] mvcc
Mise en œuvre du langage leecode - C - 15. Somme des trois chiffres - - - - - idées à améliorer
Typescript function definition
Key value judgment in the cycle of TS type gymnastics, as keyword use
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Three no resumes in the software testing industry. What does the enterprise use to recruit you? Shichendahai's resume
OpenJudge NOI 2.1 1661:Bomb Game
Simulation of Teman green interferometer based on MATLAB
leecode-C語言實現-15. 三數之和------思路待改進版
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower