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
44
votes
0 answers

How do I write a TDBCtrlGrid VCL Style custom class?

There are lots of questions here about XE2 VCL Styles and custom colors for Buttons, Panels, edits, etc, and VCL Styles. As much as I wish the existing questions covered it, they don't... So DB Control Grids appear to be Yet Another Special…
Warren P
  • 65,725
  • 40
  • 181
  • 316
43
votes
3 answers

Getting output from a shell/dos app into a Delphi app

I have a commandline application coded in delphi that I need to call from a normal desktop application (also coded in delphi). In short, I want to call the commandline app and display the text it outputs "live" in a listbox. It's been ages since I…
Jon Lennart Aasenden
  • 3,920
  • 2
  • 29
  • 44
43
votes
2 answers

Delphi ^A syntax: Documented, implied, or undocumented?

Let me explain by an example. In Delphi, you can write procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char); begin if Key = ^C then ShowMessage('The user wants to copy something.') else if Key = ^V then ShowMessage('The user…
Andreas Rejbrand
  • 105,602
  • 8
  • 282
  • 384
43
votes
5 answers

TThreadedQueue not capable of multiple consumers?

Trying to use the TThreadedQueue (Generics.Collections) in a single producer multiple consumer scheme. (Delphi-XE). The idea is to push objects into a queue and let several worker threads draining the queue. It does not work as expected,…
LU RD
  • 34,438
  • 5
  • 88
  • 296
43
votes
9 answers

difference between int* i and int *i

I'm converting a header file for a DLL written in C to Delphi so I can use the DLL. My question is what is the difference between int* i and int *i I convert the first to i: PInteger; But i'm not sure what the correct conversion is for the…
Mike Taylor
  • 2,376
  • 2
  • 17
  • 33
43
votes
5 answers

Automatically pop up tablet touch keyboard on WinForms input focus

When I run a WinForms (or Delphi, see at the end) application on Windows 10 in a tablet mode, a touch keyboard does not pop up automatically, when an input box is focused. I believe that this should happen automatically, without any additional…
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
43
votes
13 answers

Are there any downsides to using UPX to compress a Windows executable?

I've used UPX before to reduce the size of my Windows executables, but I must admit that I am naive to any negative side effects this could have. What's the downside to all of this packing/unpacking? Are there scenarios in which anyone would…
Mick
  • 13,248
  • 9
  • 69
  • 119
43
votes
1 answer

How to create a dialog like component that allows drop other controls inside it?

It is a Firemonkey component, however I could see that most of the component base is the same for VCL and FMX, so please if you know how to do that in VCL share your knowledge, it can be eventually the solution for my case. I am using a TPopup as…
Eduardo Elias
  • 1,742
  • 1
  • 22
  • 49
43
votes
7 answers

Why should I care about RTTI in Delphi?

I've heard a lot about the new/improved RTTI capabilities of Delphi 2010, but I must admit my ignorance...I don't understand it. I know every version of Delphi has supported RTTI...and I know that RTTI (Runtime Type Information) allows me to access…
Mick
  • 13,248
  • 9
  • 69
  • 119
42
votes
1 answer

SynEdit for Firemonkey?

Is there a synedit package that works with firemonkey (or someone working on it) ? From what I can gather there was a VGScene port earlier (see: this site), but it seems to been removed. Also see this site:
Jon Lennart Aasenden
  • 3,920
  • 2
  • 29
  • 44
42
votes
10 answers

Determine when running in a virtual machine

Is there an official way for an application to determine if it is running in VMWare or Virtual PC (or whatever Microsoft is calling it now)? The code I have seen is usually a hack that took advantage of some odd behavioral side effect in a specific…
Jim McKeeth
  • 38,225
  • 23
  • 120
  • 194
42
votes
10 answers

Delphi: How do you auto-update your applications?

I've been thinking of rolling my own code for enabling my Delphi application to update seamlessly as I'll be going for "release often, release early" mentality furthermore. There are various Delphi solutions (both freeware and paid) out there and…
utku_karatas
  • 6,163
  • 4
  • 40
  • 52
42
votes
8 answers

How to direct the mouse wheel input to control under cursor instead of focused?

I use a number of scrolling controls: TTreeViews, TListViews, DevExpress cxGrids and cxTreeLists, etc. When the mouse wheel is spun, the control with focus receives the input no matter what control the mouse cursor is over. How do you direct the…
avenmore
  • 2,809
  • 3
  • 33
  • 34
42
votes
1 answer

Use default authentication and separate cloaking/impersonation in DCOM call

I'm trying achieve two things with DCOM (Out of process) Set the process wide authentication using CoInitializeSecurity and its parameter pAuthList. Using cloaking to change the caller's identity in special situations (COM calls) My…
ChristianWimmer
  • 1,039
  • 8
  • 16
42
votes
2 answers

What is the difference between of object and reference to?

What is the difference between TFuncOfIntToString = reference to function(x: Integer): string; and TFuncOfIntToString = function(x: Integer): string of object; I use the of object
Ravaut123
  • 2,764
  • 31
  • 46