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
36
votes
3 answers

ms sql xml data type convert to text

in MS Sql there are data types that are not supported by delphi 7, the xml datatype is one example. I wish to convert the XML datatype to Text datatype, so that i could handle it in delphi. Is there a way to convert from xml to text?
none
  • 4,669
  • 14
  • 62
  • 102
36
votes
2 answers

How do I declare an array when I don't know the length until run time?

I originally had an array[1..1000] that was defined as a global variable. But now I need that to be n, not 1000 and I don't find out n until later. I know what n is before I fill the array up but I need it to be global therefore need a way to define…
Arthur
  • 3,376
  • 11
  • 43
  • 70
36
votes
17 answers

What components and IDE add-ins do you install with Delphi?

After a clean install of Delphi, what components and IDE add-ins do you make certain that you install? What's your Delphi "rig"? Here's what I install after a clean installation: Delphi 2007 / Delphi 2010 JCL / JVCL - JEDI Code Library and JEDI…
Mick
  • 13,248
  • 9
  • 69
  • 119
36
votes
5 answers

wsMaximized forms do not appear maximized

Setting a form to WindowState = wsMaximized will sometimes cause the form to be maximized but not: Long-time bug: this is a question I first asked in the Borland newsgroups in 2003: Accepted fix for WindowState = wsMaximized? and then again in…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
36
votes
5 answers

How to embed a browser object, other than IE, in a Delphi application

Using the default TWebBrowser makes things easy to embed a web browser. Unfortunately the one that comes in by default is IE. I'm wondering how does one integrate a Gecko or WebKit one. Are there VCL examples somewhere? If not, how would one go…
Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
36
votes
5 answers

Are there any advantages in using const parameters with an ordinal type?

I know marking string parameters as const can make a huge performance difference, but what about ordinal types? Do I gain anything by making them const? I've always used const parameters when handling strings, but never for Integer, Pointer, class…
Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329
36
votes
3 answers

Memory leak in the Win64 Delphi RTL during thread shutdown?

For a long time I’ve noticed that the Win64 version of my server application leak memory. While the Win32 version works fine with a relatively stable memory footprint, the memory used by the 64 bit version increases regularly – maybe 20Mb/day,…
Adrien Reboisson
  • 631
  • 6
  • 15
35
votes
4 answers

Which variables are initialized when in Delphi?

So I always heard that class fields (heap based) were initialized, but stack based variables were not. I also heard that record members (also being stack based) were also not initialized. The compiler warns that local variables are not initialized…
Jim McKeeth
  • 38,225
  • 23
  • 120
  • 194
35
votes
1 answer

How to build using MSBuild and Delphi XE2

I've been building projects using Delphi XE and MSBuild using the following simple example which works fine in a batch file. Project1 is an empty project created using 'File | New | VCL forms application in the IDE: call "c:\Program Files…
Brian Frost
  • 13,334
  • 11
  • 80
  • 154
35
votes
2 answers

How to hook a method to the Edit event in Delphi 7 IDE?

I'd like to automatically checkout a file when I start to edit it in Delphi 7 IDE. ClearCase is my version control system and I really hate the need to checkout a file before starting to edit. It always breaks my thought flow: I'm trying to solve a…
neves
  • 33,186
  • 27
  • 159
  • 192
35
votes
11 answers

Reintroducing functions in Delphi

What was the motivation for having the reintroduce keyword in Delphi? If you have a child class that contains a function with the same name as a virtual function in the parent class and it is not declared with the override modifier then it is a…
Frank
  • 1,003
  • 2
  • 13
  • 19
35
votes
14 answers

Is Delphi "with" keyword a bad practice?

I been reading bad things about the with keyword in delphi but, in my opinion, if you don't over use it. It can make your code look simple. I often put all my TClientDataSets and TFields in TDataModules. So in my forms I had code like this procedure…
Marioh
  • 892
  • 3
  • 8
  • 14
35
votes
11 answers

What is the easiest/most effective way to learn Delphi?

I am totally new to programming and I have chosen Delphi as the programming language that I would like to learn. I basically want to build tools that will fill and submit web forms using sockets and I want them to be multi threaded as well. I would…
Gary Becks
  • 887
  • 2
  • 13
  • 21
35
votes
5 answers

Make dialogs compatible with "large fonts".

Which do you think are best practices for making a windows dialog compatible both with standard fonts (96 dpi) and "large fonts" setting (120 dpi) so that objects don't overlap or get cut off? BTW: Just in case it's relevant, I'm interested in doing…
Narcís Calvet
  • 7,304
  • 5
  • 27
  • 47
35
votes
1 answer

How to use ScanLine property for 24-bit bitmaps?

How to use ScanLine property for 24-bit bitmap pixel manipulation? Why should I prefer to use it rather than quite frequently used Pixels property?
TLama
  • 75,147
  • 17
  • 214
  • 392