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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Boxes showing around components

There is an issues with the display of the program in FMX Delphi. The following shows sometimes and after some use (by scrolling quite a bit) the borders of the box disappear. Borders showing randomly:...
1 vote
1 answer
74 views

How to get rid off the rectangular selection in SynEdit?

I am using SynEdit installed by the Delphi GetIt Package Manager. While working with SynEdit, sometimes I get a rectangular selection and do not know how to disable it again. Then I need to restart ...
2 votes
1 answer
136 views

When to specify a custom epsilon in Delphi's SameValue function?

I recently came across the SameValue function to compare floating-point numbers. I noticed that we can optionally specify an epsilon value for this function. From the documentation, I understand that ...
2 votes
1 answer
71 views

Does TFDTable support SortOptions.NullsFirst?

Given a PostgreSQL table with an index like: DROP INDEX IF EXISTS RefNo1; CREATE INDEX RefNo1 ON MyTable (RefNo1 NULLS FIRST, Date DESC NULLS FIRST, GLPostDate DESC NULLS FIRST); If I drop a TFDTable ...
0 votes
0 answers
24 views

Auto Collapse / Expand next to functions and procedures

In the editor, you have - and + buttons next to procedures and functions so you can hide / show them. Like below Is there any way to add these next to say If statements or Case Statements ect. Or ...
2 votes
1 answer
33 views

Growing Firebird database caused by CommitRetaining?

We have users reporting Firebird databases that are way to big for the number of entries stored by our application. I found an article Commit vs CommitRetaining indicating that using CommitRetaining ...
0 votes
0 answers
50 views

What is the purpose of having a BPL for a runtime-only library?

I have seen someone put together in one folder a bunch of external libraries (totaling 2GB) that are Runtime only and compile all that code via a standard DPR app. In the end, the EXE file was ...
0 votes
0 answers
45 views

Delphi - Access violation when freeing Indy SSLIOHandler

Delphi 11.3 - default Indy components that come with this Delphi version I have a DelphiMVCFramework REST API server using SSL. In my client application I use the TRestClient object from MVCFramework ...
-1 votes
1 answer
59 views

Change a Label text which crerated dynamically in a layout at ListBoxItem

I'm creating dynamically ListBoxItems in a ListBox. Inside the ListboxItem are creating Layouts(3 of them) and inside them Labels. Now I'm trying to search and find a specific label and change its ...
1 vote
0 answers
72 views

TFloatAnimation leaving "afterimages" when dynamically creating components

I am having issues with the following code: procedure TForm1.Button1Click(Sender: TObject); var Rectangle:TRectangle; Animation: TFloatAnimation; begin Rectangle := TRectangle.Create(Self); With ...
1 vote
0 answers
93 views

Delphi Refactor-Rename and Find-References failure workarounds?

I've been using Delphi 11.3 for a month or two now (after many years of using Delphi since the original), and I keep running into problems with the Refactor > Rename function and the Find > ...
0 votes
1 answer
67 views

Delphi IDE package load error on %1 is not a valid Win32 application

Using RAD Studio 10.2.3, I have suddenly started getting and error when loading 5 of the FireDAC-related packages at IDE startup, and when loading a project: %1 is not a valid Win32 application I ...
0 votes
1 answer
61 views

AddFontResource not working on my Win64 Delphi Application

My application is a VCL Win64 application built with Delphi 10.3.3. For some reason, AddFontResource() is not working properly on Windows 11. Here is what I have so far: procedure TfrmMenuPrincipal....
0 votes
1 answer
53 views

Can FireDAC access indexes on temporary PostgreSQL tables?

We are moving our database from Advantage Database to PostgreSQL. One of the common patterns we use is something like: TRY DROP TABLE #TemporaryTable; CATCH ALL END TRY; SELECT Field1, Field2 INTO #...
2 votes
7 answers
17k views

How to pause program execution until button press?

I've got an algorithm. I'd like to pause it at some point and then continue once the user presses a button. How do I do that? I've browsed the documentation, and searched the internet, but no luck yet....
0 votes
0 answers
49 views

What/where is TAdapterJSONValue?

I'm trying to follow the example Use TRESTDataSetAdapter with arbitrary JSON. It uses a TAdapterJSONValue type that I cannot get to compile. Somebody else has been trying the same here, but his/her ...
6 votes
4 answers
4k views

How to convince the memory manager to release unused memory

In a recent post ( My program never releases the memory back. Why? ) I show that when using FastMM, the application does not release substantial amounts of memory back to the system. Recently I ...
0 votes
1 answer
52 views

Where can I find the constant definition of LANG_HINDI?

I am writing a Delphi program which will use Hindi. I use Soluling which produce .RC files with constant LANG_HINDI. But it is not recognized as a valid constant. I try to search all source files ...
0 votes
1 answer
63 views

Teechart VCl/Delphi : Use a second axis

I tried to use a teechart with a second axis but all the examples I found are not in Delphi. I even tried ChatGPT but the code is wrong. It suggests Chart1.VerticalAxis := aRightAxis; but Chart1 has ...
0 votes
3 answers
571 views

Multiple selection using shift arrow broken after programmatically selecting a line in Delphi ListView

I am using a both owner draw and data listview in a Delphi and I noticed a weird problem if I select using shift arrow immediately after having first programmatically changed the selected line the ...
0 votes
2 answers
78 views

Delphi BPL check for 32/64 bit

Is there a straightforward way to examine a Delphi BPL file for 32/64 bitness? I want to be able to do this outside of attempting to load the BPL itself - e.g. open the BPL as a binary file and read ...
-2 votes
0 answers
50 views

Ler nós JSON com delphi [closed]

Good morning guys, I would like some help. I have the following sections within the JSON files below. I need to get the value of the "minNotional" tag. The function I currently use takes the ...
4 votes
4 answers
12k views

How can I create a new SQLite file and table at runtime using FieldDefs?

I'm using Delphi Seattle to create a brand new table in a brand new SQLite file and using only FieldDefs and non-visual code. I can create a table using the ExecSQL ('CREATE TABLE....' ) syntax but ...
0 votes
0 answers
107 views

The problem of the small main interface of Delphi or other programs [closed]

I program on Delphi, and I noticed that previously I had a computer with a large screen and the program interface, including the form, was large and normal and I could work comfortably. However, I ...
0 votes
1 answer
38 views

How do I create a TWebFrame dynamically from code and show it?

So basically I have a TMS Web Core App and I've created a TWebFrame with some random components on it. I want to dynamically create this frame and show it on my main form, but whenever I try to do ...
1 vote
1 answer
62 views

Spring4D Nullable<T> JSON serialization

Is there a way to get TJson.ObjectToJsonString() properly serialize a TNullableInteger field in an object? I tried to use an attribute on the field using a JsonReflectAttribute with a TJSONInterceptor,...
1 vote
1 answer
655 views

Why is ITaskFolder.RegisterTaskDefinition not working?

I'm trying to programmatically create a task in Windows Task Scheduler using Delphi. Here's the code. procedure TForm1.Button1Click(Sender: TObject); var ts: ITaskService; tf: ITaskFolder; tf2: ...
1 vote
3 answers
113 views

Using delphi application to ask question to ChatGpt

I'm facing on ChatGpt to create an application using delphi 11, where the purpose is send data to AI then get a response related to it. This is the code (but I get SSL protocol error on httpClient....
-1 votes
2 answers
137 views

Writeln is not working the right way it should

I am new to Lazarus and trying to write some basic code: unit Unit1; {$mode objfpc}{$H+} interface uses Classes, SysUtils, Forms, Controls, Graphics, Dialogs; type TForm1 = class(TForm) ...
6 votes
2 answers
5k views

Best way to implement observer pattern in Delphi

I found different implementations of the observer pattern in Delphi, like: Sourcemaking Design Patterns and Delphi Hobbyist. In general, what is the best way to implement an observer in Delphi? I ...
13 votes
14 answers
31k views

Why are my units "compiled with a different version" of my own files?

I'm building a program that uses plugins. Unfortunately, the plugin framework's dynamic linking forces the RTL and VCL out of my project EXE and into the BPL versions, and they don't have debug info ...
-1 votes
0 answers
86 views

I try to download html in text format from a website

I wish to get html code from a given website in text format to a Memo component, using Delphi6. How could I achieve that? Which components should I add? I have noticed some related questions and ...
1 vote
1 answer
69 views

How to set a URL QueryString Parameter in TMS Web Core?

I'm able to get a param using the GetQueryParam function from this answer in the WebLib.WebTools unit to get parameters from the current URL. One would assume the opposite of getting a param would be ...
0 votes
2 answers
6k views

How to solve [FireDAC][Phys][SQLite] ERROR: unable to open database file, When app is installed in programFiles?

I developed a tool using Firedac with the database as SQLite. after finishing the project and making an installer (InnoSetup) I get an error [FireDAC][Phys][SQLite] ERROR: unable to open database ...
1 vote
1 answer
83 views

Controlling headers and footers when printing using TEdgeBrowser component

The TWebBrowser component has been replaced by the TEdgeBrowser. My goal is to customize the text in the header and footer sections of a printed HTML page when the user prints using the TEdgeBrowser ...
1 vote
2 answers
67 views

How can I execute JavaScript code from Delphi using TMS Web Core?

I've created a simple app with a TWebEdit and a TWebButton on it. I want to call/execute a JavaScript alert() function from within the button that will alert the text from the TWebEdit. How can I do ...
0 votes
1 answer
462 views

Using TMS WEB Core and JSON

Starting from a VCL project to TMS WEB Core, I can no longer use "System.JSON". Having declared : LJsonValue: TJsonValue; LJsonArray: TJsonArray; LJSonString: TJsonString; How to translate ...
0 votes
1 answer
30 views

How to get a URL QueryString Parameter in TMS Web Core?

How can I get a QueryString Parameter Variable from the URL using Delphi code? Let's assume I have a URL as follows: https://www.example.com/index.html?first_name=shaun&last_name=roselt How do I ...
25 votes
4 answers
10k views

Google Cloud Messaging in Delphi XE5?

I've got an android app that I am thinking about porting to Delphi but I can't see a way to interface with GCM. I am thinking I would possibly have to run the GCMBaseIntentService in java and ...
1 vote
1 answer
72 views

Error compiling code for Android in Delphi

When I try to compile code for Android in Delphi, it shows this error: [PAClient Error] Error: E7688 Unable to execute '"C:\Program Files\Eclipse Adoptium\jdk-11.0.15.10-hotspot\bin\java.exe&...
3 votes
1 answer
327 views

How do I use THasAttributeFilter in Spring4d

I would like to query some attributes (aka annotations) in a class I'm writing. I can do it the complex way, but I'd like to use Spring4D instead. It has a unit called Reflection that looks like ...
10 votes
3 answers
8k views

How can I tell if a Delphi control is currently visible?

I need a way to for a custom control (descended from TCustomControl) to tell if it is currently visible. I'm not talking about the .Visible property; I mean whether or not it's actually being ...
0 votes
0 answers
115 views

How can I connect a bunch of TPoints with a polyline without self-intersections in Delphi?

I have an array of TPoints and I want to draw the trellis that passes through all these points without intersecting itself. Is there any algorithm available?
0 votes
2 answers
84 views

Custom converter for TJsonMarshal in Delphi 11

I am trying to register a custom converter to avoid the inherited properties in TObjectList - mainly FListHelper and FOwnsObjects. But I cannot get the custom converter to register, and the ...
-1 votes
1 answer
88 views

How to change the color of focused and selected rows in DevExpress TcxGrid using different colors?

I want to change the color of selected records (marked check boxes) and focused record in a TcxGrid by different colors.
0 votes
0 answers
70 views

Connect remote Interbase database freeze my app

I have an application (C++Builder, Delphi) and I connect to remote Interbase database via IBX (TIBDatabase). When try to connect to database using network and the IP address dosn't exists, so the ...
0 votes
1 answer
105 views

Could not find acceptable ICU library

I have a HORSE API that I use on a Linux Ubuntu 20.04 server. In this API, I use a Firebird 3.0 database. Today, I made some small updates to some features, basically changing only some types of data ...
0 votes
2 answers
73 views

How to create SHA-512 Cryptographic Hash Algorithm using Delphi 7? [duplicate]

I use this code to try it and I need to get result like this site https://sha512.online/ use IdHash,IdHashSHA; function TForm1.SHA512(const AString: string): string; var LSHA512: TIdHashSHA512; begin ...
4 votes
1 answer
67 views

See webcolors and custom colors in Delphi's Object Inspector colorpicker at design-time

when designing a form and its components at design-time, some properties of color type allow us to choose colors from a list of predefined default Delphi colors: double clicking on this property, we ...
0 votes
1 answer
77 views

Compiling Pascal code with Lazarus LCL in Linux

I am trying to compile/port on Linux a project which was originally written in Delphi on Windows. I have zero experience with Delphi on Windows and I have only very limited experience with Pascal. I ...

1
2 3 4 5
1026