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
Filter by
Sorted by
Tagged with
270 votes
1 answer
11k views

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 (...
Side S. Fresh's user avatar
193 votes
9 answers
393k views

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's user avatar
  • 12.5k
179 votes
20 answers
435k views

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 ...
Mawg says reinstate Monica's user avatar
178 votes
2 answers
3k views

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 ...
delphidabbler's user avatar
153 votes
1 answer
23k views

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 ...
Warren  P's user avatar
  • 67.2k
147 votes
2 answers
8k views

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;...
mh taqia's user avatar
  • 3,556
146 votes
8 answers
11k views

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 ...
mjn's user avatar
  • 36.4k
145 votes
7 answers
44k views

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 ...
Marek Jedliński's user avatar
123 votes
3 answers
35k views

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'...
LaKraven's user avatar
  • 5,834
115 votes
10 answers
74k views

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 ...
MB.'s user avatar
  • 7,445
111 votes
4 answers
56k views

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. ...
UnDiUdin's user avatar
  • 15.1k
109 votes
12 answers
202k views

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's user avatar
  • 19k
106 votes
2 answers
2k views

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 ...
David's user avatar
  • 13.5k
104 votes
1 answer
3k views

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 ...
Wodzu's user avatar
  • 6,932
99 votes
1 answer
2k views

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: <xs:element name="MyReport" type="MyReportType" /> <xs:complexType name="MyReportType"> &...
Randomeister's user avatar
  • 1,125
93 votes
21 answers
328k views

Split a string into an array of strings based on a delimiter

I'm trying to find a Delphi function that will split an input string into an array of strings based on a delimiter. I've found a lot from searching the web, but all seem to have their own issues and I ...
Ryan's user avatar
  • 7,815
86 votes
2 answers
3k views

Is the compiler treatment of implicit interface variables documented?

I asked a similar question about implicit interface variables not so long ago. The source of this question was a bug in my code due to me not being aware of the existence of an implicit interface ...
David Heffernan's user avatar
75 votes
9 answers
8k views

Why is it bad practice to call an eventhandler from code?

Say you have a menu item and a button that do the same task. Why is it bad practice to put the code for the task into one control's action event and then make a call to that event from the other ...
jjb's user avatar
  • 1,370
73 votes
2 answers
2k views

Webview not displaying in MacOS using Delphi XE2

I have started to convert the Webview interfaces to be consumed in Delphi. I have managed to get the webkit library to load, and the interface methods that is called appears to work correctly, ...
Phillip Roux's user avatar
  • 1,029
68 votes
1 answer
786 views

Delphi XE6 link C code in iOS

I've built an App on Android using Delphi XE6 that requires C code. However on iOS I cannot make it work. I suspect the problem is related to arm/thumb status, but I am not sure. There is no problem ...
Xavier Dufaure de Citres's user avatar
67 votes
1 answer
2k views

BcdDivide function behave differently in Delphi XE and XE2

FmtBcd.pas has been extensively revised rewritten in Delphi XE2. In one of my projects, I have a case that uses a division operation on two Bcd values, but the two versions yield different results. In ...
Chau Chee Yang's user avatar
65 votes
5 answers
8k views

How Do I Choose Between the Various Ways to do Threading in Delphi?

It seems that I've finally got to implement some sort of threading into my Delphi 2009 program. If there were only one way to do it, I'd be off and running. But I see several possibilities. Can ...
lkessler's user avatar
  • 20.1k
64 votes
5 answers
121k views

Selecting a directory with TOpenDialog

I'd really like to know the various ways I could select a directory with the TOpenDialog, whether it be downloading a new component or using what is provided by Delphi, but preferably using what is ...
ple103's user avatar
  • 2,110
64 votes
1 answer
2k views

Live Binding with Automatic updates in XE3 (no need to call Notify() as in XE2)

I am currently using Delphi XE2, and heard about their new Live Binding with Automatic updates in XE3 (no need to call Notify() as in XE2). in C# or in Delphi XE2 we have to implement ...
Vibeeshan Mahadeva's user avatar
63 votes
9 answers
11k views

How should I prepare my 32-bit Delphi programs for an eventual 64-bit compiler? [duplicate]

Possible Duplicate: How to also prepare for 64-bits when migrating to Delphi 2010 and Unicode Since I believe that 64bit Delphi compiler will appear soon, I am curious if anybody knows what kind ...
Petra's user avatar
  • 813
62 votes
17 answers
13k views

Accidentally created a virus?

I've seen it happen reasonably often: I write an application in Delphi and when I compile it, the virus-scanner tells me that I've created a virus and then immediately deletes the executable again. It'...
Wim ten Brink's user avatar
62 votes
6 answers
93k views

Delphi: StringList Delimiter is always a space character even if Delimiter is set

I am having trouble with the delimiter in the TStringList Class. Take a look: var s: string; sl: TStringList; begin sl := TStringList.Create; s := 'Users^foo bar^bar foo^foobar^barfoo'; sl....
Acron's user avatar
  • 1,388
60 votes
8 answers
6k views

Studies of relative costs for development in different languages

Has anyone seen a recent (and fairly balanced) study into the relative costs for software development using differing languages ? I would particular like to see the relative costs of Java Vs. C# Vs. ...
mmmm's user avatar
  • 2,441
60 votes
9 answers
29k views

Unit testing in Delphi - how are you doing it? [closed]

I'm wondering how the few Delphi Programming users here are doing unit testing, if any? Is there anything that integrates with the Delphi IDE that you've found works well? If not, what tools are you ...
Drew Gibson's user avatar
  • 1,634
60 votes
4 answers
26k views

What's the difference between "var" and "out" parameters?

What's the difference between parameters declared with var and those declared with out? How does the compiler treat them differently (e.g., by generating different code, or by changing which ...
Rob Kennedy's user avatar
59 votes
5 answers
34k views

Why should I not use "if Assigned()" before accessing objects?

This question is a continuance of a particular comment from people on stackoverflow which I've seen a few different times now. I, along with the developer who taught me Delphi, in order to keep things ...
Jerry Dodge's user avatar
  • 27.1k
58 votes
4 answers
61k views

How do I make Beyond Compare ignore certain differences while comparing versions of Delphi Form Files

I use Beyond Compare (version 3.1.10) to compare different versions of Delphi Form Files, but I don't want to see differences concerning ExplicitTop, ExplicitLeft, ExplicitHeight and ExplicitWidth. ...
Svein Bringsli's user avatar
58 votes
4 answers
2k views

Remote debugging with XE2 - display of strings

I'm remote debugging a large app between DElphi XE2 (update #4) and a Windows XP target. PAServer is running on the target and the application works fine and stops at breakpoints (you would NOT ...
Brian Frost's user avatar
  • 13.3k
56 votes
10 answers
86k views

Delphi 2006-2010 error: "Cannot create file C:\Users\Admin\AppData\Local\Temp\EditorLineEnds.ttr"

I am getting an error after installing Delphi 2007 (Edit: This problem occurs in all Delphi versions from 2006 to 2010) that I can not figure out and have never seen before. After restarting I can ...
M Schenkel's user avatar
  • 6,334
55 votes
3 answers
71k views

What's the difference between Refresh, Update and Repaint?

I don't know which of those three methods suits me most. They all work for me. Does anyone know the difference between Refresh, Update and Repaint?
Ivan Prodanov's user avatar
54 votes
12 answers
30k views

Profiler and Memory Analysis Tools for Delphi [closed]

I recently upgraded from Delphi 4 to Delphi 2009. With Delphi 4 I had been using GpProfile by Primoz Gabrijelcic as a profiler and Memory Sleuth by Turbo Power for memory analysis and leak debugging. ...
54 votes
2 answers
7k views

Is COM broken in XE2, and how might I work around it?

Update: XE2 Update 2 fixes the bug described below. The program below, cutdown from the real program, fails with an exception in XE2. This is a regression from 2010. I don't have XE to test on but I'...
David Heffernan's user avatar
54 votes
4 answers
1k views

Midi Timing Issues with Delphi ASIO VST and MiniHost

I'm coming from a background of using MSC* MidiSequencer for a Delphi XE2 project and have been playing with DelphiASIOVST this weekend on the off chance the MIDI may be stable enough to use as my ...
Charles R. Thompson's user avatar
53 votes
6 answers
41k views

How to get the Memory Used by a Delphi Program

I know how to get the System memory use using GlobalMemoryStatusEx, but that tells me the what the entire OS is using. I really want my program to report how much memory it alone has allocated and is ...
lkessler's user avatar
  • 20.1k
53 votes
1 answer
7k views

How to make TRichEdit behave like WordPad on Windows 7 when changing font for certain non-text characters?

With the help of Sertac Akyuz, it seems the direct reason is related to the charset of \bullet: In my localized Windows, the \bullet input by typing Alt(0149) always gets \fcharset134, and attempts to ...
SOUser's user avatar
  • 3,832
52 votes
5 answers
28k views

Which is preferable: Free or FreeAndNil?

What is the basic difference between Free and FreeAndNil? Is FreeAndNil = Free + Nil? When should I use Free and when should I use FreeAndNil?
Bharat's user avatar
  • 6,838
52 votes
3 answers
37k views

Delphi: What is Application.Handle?

What is TApplication.Handle? Where does it come from? Why does it exist? And most importantly: why do all forms have it as their parent window handle? The Delphi help says: TApplication.Handle ...
Ian Boyd's user avatar
  • 251k
51 votes
5 answers
18k views

Identifiers for Delphi's $WARN compiler directive

Delphi has a $WARN compiler directive that allows one to selectively enable or disable specific warnings. The Delphi 2009 help file describes the syntax: {$WARN identifier ON|OFF} But it only lists ...
Jan Goyvaerts's user avatar
51 votes
0 answers
2k views

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 ...
Warren  P's user avatar
  • 67.2k
49 votes
13 answers
98k views

Standard URL encode function?

Is there a Delphi equivalent of this .net's method: Url.UrlEncode() Note I haven't worked with Delphi for several years now. As I read through the answers I notice that there are several remarks and ...
Boris Callens's user avatar
49 votes
4 answers
110k views

Create a constant array of strings

Is there a way in Delphi declaring an array of strings such as following one? {'first','second','third'}
none's user avatar
  • 4,769
49 votes
4 answers
13k views

Best way to do non-flickering, segmented graphics updates in Delphi?

I thought I could just throw this out there and just ask: I have seen Delphi controls that are flawless in terms of graphical effects. Meaning: no flickering, sectioned updates (only redraw the ...
Jon Lennart Aasenden's user avatar
49 votes
2 answers
11k views

Why can a WideString not be used as a function return value for interop?

I have, on more than one occasion, advised people to use a return value of type WideString for interop purposes. Accessing Delphi DLL throwing ocasional exception ASP.NET web app calling Delphi DLL ...
David Heffernan's user avatar
48 votes
12 answers
50k views

Why would a Delphi programmer use Lazarus as the IDE instead of using Delphi's IDE? [closed]

I've been very happy with the Delphi IDE for programming in Delphi. But I've heard about the Lazarus programming environment, and I've also heard that some Delphi programmers use it instead of the ...
lkessler's user avatar
  • 20.1k
48 votes
3 answers
21k views

Is it possible to define {$IFDEF} for more than one directive at once?

Is it possible to define more than one conditional in one {$IFDEF} directive ? I would like to have syntax like this: {$IFDEF Condition1 OR Condition2} DoSomething; {$ENDIF} {$IFDEF Condition1 AND ...
Martin Reiner's user avatar

1
2 3 4 5
1037