Questions tagged [delphi]

Delphi is a language for rapid development of native Windows, macOS, Linux, iOS, and Android applications through use of Object Pascal. The name refers to the Delphi language as well as its libraries, compiler and IDE which is used to help edit and debug Delphi projects.

Delphi is a general-purpose language for rapid development of native Windows, OS X, Linux, iOS, and Android applications.

The name used to refer to the Delphi language, but the developers decided to return to the languages original name Object Pascal, restraining the name to the IDE, which is used to help edit and debug Delphi projects more efficiently. It is developed by Embarcadero, and is sold either as a standalone product or as part of RAD Studio, which includes other languages as well.

Delphi is an enhancement of Niklaus Wirth's language Pascal (and Object Pascal).

Delphi originated in 1995 at Borland, evolving from Turbo Pascal. It is currently owned by Embarcadero, and is the second-largest Windows development platform after Microsoft's .NET.

Among Delphi's strengths are:

  • consistent language architecture
  • a fast compiler
  • modern language constructs
  • its extensive Visual Component Library (VCL)
  • the associated visual form designer

Variants:

Some other Embarcadero products are or were released using the "Delphi" brand. A .NET product called Delphi Prism (based on PascalScript codebase) for use in MS Visual Studio allows for development using Mono, producing apps that are "cross platform" in that they will run on multiple platforms that support Mono. Delphi Prism is mostly compatible with Delphi syntax, albeit with very different libraries. The Embarcadero PHP product, formerly labelled "Delphi for PHP", and Prism are integrated in the main Embarcadero studio project RAD Studio. There is an AS/400 version of Delphi as well.

Delphi console "Hello world":

program Hello;
{$APPTYPE CONSOLE}
begin
  Writeln('Hello, World');
end.

A minimalist GUI Delphi application

program GUIHello;
uses  
  Windows;
begin
  MessageBox(0, 'Message', 'Hello, World', MB_OK);
end.

Resources:

Many SO profiles of Delphi developers point to good resources concerning Delphi. There is also an aggregation of main blogs in the field at DelphiFeeds and Begin End. Marco Cantù's books on Delphi programming provide another great resource.

Documentation

See all questions around delphi here.

References

Tagging recommendation:

There are several version-specific tags. It is recommended to use the tag together with the version-specific tag, e.g. .

Free Delphi/Pascal Programming Books

Delphi/Pascal Books

Reporting bugs, issues, new features

Delphi Forums

51211 questions
12
votes
1 answer

Using Indy 10 IdHTTP with TLS 1.2

Im using Delphi XE2 with Indy 10.5.8.0 Currently i need to change a connection to one of our server to use only TLS 1.2, at the moment we are using TLS 1.0 As handler for IdHTTP , IdSSLIOHandlerSocketOpenSSL is being used. I tried changing the…
vexen
  • 345
  • 1
  • 4
  • 20
12
votes
3 answers

How to access Windows shell context menu items?

In Windows Explorer, you right click on a file, a context menu shows up which contains built-in items like 'Send to...' and/or 3rd party actions such as 'zip file with Winzip'. My question are: How to obtain the full list of available menu items…
Edwin Yip
  • 4,089
  • 4
  • 40
  • 86
12
votes
1 answer

How to change background color of an TListview item?

How can I customize my listview to display different background colors like in the picture below ? My listview is bound to a datasource (Livebindng). I want to use the color field to set my backgroud color. I've customized my view this way : 3…
12
votes
6 answers

Substring algorithm suggestion

I have a large set (100k) of short strings (not more than 100 chars) and I need to quickly find all those who have a certain substring. This will be used as a search box where the user starts typing and the system immediately gives "suggestions"…
cfischer
  • 24,452
  • 37
  • 131
  • 214
12
votes
1 answer

Why is Sysutils.RenameFile inlined?

[dcc32 Hint] H2443 Inline function 'RenameFile' has not been expanded because unit 'Winapi.Windows' is not specified in USES list I understand that inlining a function makes the code faster. But I see the gain only in tight places. For example…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
12
votes
4 answers

How can I extract a resource into a file at runtime?

I want to distribute only a single .exe, however, at runtime I would like it to extract some embedded image resources to the users hard disk drive. Can I, and if so, how?
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
12
votes
5 answers

Export a global symbol from a Delphi DLL

I'm trying to create a Gecko 2.0-compatible DLL in Delphi. Previously (pre-Gecko 2.0) the DLL needed to export a NSGetModule() function. This worked flawlessly. Starting with Firefox 4, my DLL is getting loaded (I have verified this though a…
Stefan
  • 537
  • 3
  • 8
12
votes
1 answer

DCPcrypt Hashing German Umlauts

I am using DCPcrypt and SHA512 to hash strings. I am using the version by Warren Postma https://bitbucket.org/wpostma/dcpcrypt2010 It is working fine. However it failes with german umlauts like ä, ö, ü and probably other unicodes. I am using the…
Tommy
  • 596
  • 6
  • 30
12
votes
5 answers

Delphi plugin framework

I want to design Delphi plugin framework. There are three options: 1. DLL 2. BPL 3. COM interface Every option has some disadvantage. DLL - Promblem with MDI apllication, forms from plugin cannot be embeded to the host exe - mdi application. BPL -…
Peter
  • 269
  • 3
  • 13
12
votes
3 answers

Erased components in Delphi program

Updates 2016-02-18: Added process information I have a Delphi program compiled using XE4. It is being used by a few hundred customers. A couple of weeks ago one of these customers reported that some areas of the executable was being erased (images…
Ricardo Acras
  • 35,784
  • 16
  • 71
  • 112
12
votes
2 answers

Delphi: How delegate interface implementation to child object?

i have an object which delegates implementation of a particularly complex interface to a child object. This is exactly i think is the job of TAggregatedObject. The "child" object maintains a weak reference to its "controller", and all QueryInterface…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
12
votes
3 answers

How can I find out which procedure threw an exception in Delphi?

I am using Delphi TApplication.OnException Event to catch unhandled exceptions This works well but does not give sufficient information about where the exception happened i.e. ‘Catastrophic failure’ How can I find out which procedure made the…
Charles Faiga
  • 11,665
  • 25
  • 102
  • 139
12
votes
7 answers

How to determine the OS

how to implement a function that will return the OS name? detect the environment where the program running on? win2000/xp/vista/win7 etc...?
XBasic3000
  • 3,418
  • 5
  • 46
  • 91
12
votes
4 answers

How do I close a modal form right after opening it?

From my application I wish to open a dialog, which should close immediately (after a short message) under some circumstances. I've tried this: procedure TForm2.FormActivate(Sender: TObject); begin if SomeCondition then begin ShowMessage('You…
Svein Bringsli
  • 5,640
  • 7
  • 41
  • 73
12
votes
1 answer

How to fold an inserted region with Open Tools API?

I wanna insert a region in an edit view and then fold this region. // fEditView: IOTAEditView; var writer: IOTAEditWriter; begin writer := fEditView.Buffer.CreateUndoableWriter; //... writer.Insert('{$REGION…
Baoquan Zuo
  • 652
  • 4
  • 15