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
270
votes
1 answer

How to affect Delphi XEx code generation for Android/ARM targets?

Update 2017-05-17. I no longer work for the company where this question originated, and do not have access to Delphi XEx. While I was there, the problem was solved by migrating to mixed FPC+GCC (Pascal+C), with NEON intrinsics for some routines…
Side S. Fresh
  • 3,015
  • 2
  • 16
  • 18
189
votes
9 answers

Indentation shortcuts in Visual Studio

I'm using Visual Studio 2010 and C#. How can I indent the selected text to left/right by using shortcuts? In the Delphi IDE the equivalents are Ctrl+Shift+I and Ctrl+Shift+U
RBA
  • 12,337
  • 16
  • 79
  • 126
179
votes
20 answers

The application was unable to start correctly (0xc000007b)

I have a client/server app which I have been developing on a single PC. Now it needs two serial ports, so I borrowed a PC from a friend. When I build my app and try to run or debug it (whether in the Delphi IDE or from Windows File manager), it…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
178
votes
2 answers

Delphi XE custom build target is always disabled

I've created a custom MSBuild .targets file that I've included in a Delphi XE project via the IDE and enabled it from the Project Manager's context menu. Although the file validates, it always gets disabled after I re-save the project file. Here's a…
delphidabbler
  • 1,899
  • 1
  • 11
  • 7
153
votes
1 answer

SOAP server and client application VCL+indy demo for Delphi XE?

Delphi used to include a demos folder for web Services, but no longer seems to include this. I just tried the Delphi 7 demo projects (SOAPDMServerWAD, a server with almost no UI at all, and SOAPDMClient) and was unable to get them to function, even…
Warren P
  • 65,725
  • 40
  • 181
  • 316
147
votes
2 answers

How to create "No Activate" form in Firemonkey

In XCode by adding these methods to your NSView subclass can prevent the window from becoming active when clicking on it: - (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent )theEvent { return YES; } - (BOOL)acceptsFirstMouse:(NSEvent )theEvent…
mh taqia
  • 3,506
  • 1
  • 24
  • 35
145
votes
8 answers

EProgrammerNotFound exception in Delphi?

In Delphi 2009, SysUtils.pas contains this in line 425: EProgrammerNotFound = class(Exception); Is this simply an easter egg or something serious? When should this exception be raised? Does it also exist in Delphi Prism and/or Free Pascal? Q: Is…
mjn
  • 36,362
  • 28
  • 176
  • 378
141
votes
7 answers

Find out what process registered a global hotkey? (Windows API)

As far as I've been able to find out, Windows doesn't offer an API function to tell what application has registered a global hotkey (via RegisterHotkey). I can only find out that a hotkey is registered if RegisterHotkey returns false, but not who…
Marek Jedliński
  • 7,088
  • 11
  • 47
  • 57
122
votes
3 answers

List of Delphi language features and version in which they were introduced/deprecated

Before I begin, I would like to point out that I have honestly and genuinely searched repeatedly and exhaustively via Google for such a thing, and been unable to find one. I require (for a project I'm developing) a list of all Delphi (2007 to the…
LaKraven
  • 5,804
  • 2
  • 23
  • 49
115
votes
10 answers

Are delphi variables initialized with a value by default?

I'm new to Delphi, and I've been running some tests to see what object variables and stack variables are initialized to by default: TInstanceVariables = class fBoolean: boolean; // always starts off as false fInteger: integer; // always starts…
MB.
  • 7,365
  • 6
  • 42
  • 42
111
votes
4 answers

How do I make my GUI behave well when Windows font scaling is greater than 100%

When choosing large font sizes in the Windows control panel (like 125%, or 150%) then there are problems in a VCL application, every time something has been set pixelwise. Take the TStatusBar.Panel. I have set its width so that it contains exactly…
UnDiUdin
  • 14,924
  • 39
  • 151
  • 249
108
votes
12 answers

How do I include a newline character in a string in Delphi?

I want to create a string that spans multiple lines to assign to a Label Caption property. How is this done in Delphi?
Brendan
  • 18,771
  • 17
  • 83
  • 114
106
votes
2 answers

How do you extract local variable information (address and type) from a Delphi program or the compiler-generated debug info?

My goal is: Given a suspended thread in a Delphi-compiled 32 or 64-bit Windows program, to walk the stack (doable) Given stack entries, to enumerate the local variables in each method and their values. That is, at the very least, find their address…
David
  • 13,360
  • 7
  • 66
  • 130
104
votes
1 answer

Is there a way to programmatically tell if particular block of memory was not freed by FastMM?

I am trying to detect if a block of memory was not freed. Of course, the manager tells me that by dialog box or log file, but what if I would like to store results in a database? For example I would like to have in a database table a names of…
Wodzu
  • 6,932
  • 10
  • 65
  • 105
99
votes
1 answer

Required tags not present when using Delphi XML Data Binding Wizard

I am using the XML Data Binding Wizard in Delphi XE2. The schema has required tags of this type:
Randomeister
  • 1,125
  • 6
  • 5
1
2 3
99 100