当前位置:网站首页>[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 :
边栏推荐
猜你喜欢
杰理之AD 系列 MIDI 功能说明【篇】
[MySQL learning notes 30] lock (non tutorial)
qt颜色与字符串、uint相互转换
QT color is converted to string and uint
合规、高效,加快药企数字化转型,全新打造药企文档资源中心
Basics of reptile - Scratch reptile
How to delete all the words before or after a symbol in word
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
Set picture annotation in markdown
Simulation of Michelson interferometer based on MATLAB
随机推荐
Detailed explanation | detailed explanation of internal mechanism of industrial robot
opencv学习笔记八--答题卡识别
Select all the lines with a symbol in word and change them to titles
洛谷P1836 数页码 题解
杰理之AD 系列 MIDI 功能说明【篇】
Is the super browser a fingerprint browser? How to choose a good super browser?
Simulation of Teman green interferometer based on MATLAB
Relevant introduction of clip image
[cf gym101196-i] waif until dark network maximum flow
Go learning --- use reflection to judge whether the value is valid
NiO programming introduction
chrome查看页面fps
Emo diary 1
Get/post/put/patch/delete meaning
[online problem processing] how to kill the corresponding process when the MySQL table deadlock is caused by the code
学go之路(二)基本类型及变量、常量
[MySQL learning notes 29] trigger
Full Score composition generator: living on code
JDBC learning notes
Simulation of holographic interferogram and phase reconstruction of Fourier transform based on MATLAB