52,313 questions
0
votes
0
answers
7
views
Can you enable strict Int32/Int64 type compatiblity in Delphi 12?
I am migrating a whole lot of classes to Int64 from Integer which in my 32 bit application are 32 bit.
I would like the compiler to throw an exception if I pass an Integer which is 32 bit to a ...
1
vote
1
answer
24
views
RTTI not available for methods of instantiated generic class
I am trying to retrieve RTTI information for an instantiated generic class using Delphi 12.2 Pro.
The Delphi documentation states (https://docwiki.embarcadero.com/RADStudio/Athens/en/...
0
votes
0
answers
42
views
Is there a QRCode in Delphi 11 VCL?
I was previously using Delphi 7 and it had the normal codebar and QRcode, when I used Delphi 11 VCL and wanted to print a report using FastReport, I found only the normal codebar, I could not find the ...
0
votes
1
answer
31
views
How to paint a gradient color background of a TDBGrid cell in delphi
My goal is to draw a Delphi TDBgrid cell to have a gradient color from right to left, like the image below:
I used the GradientFillCanvas procedure from the Vcl.GraphUtil unit.
Here is my custom ...
0
votes
0
answers
47
views
How to reduce CPU load in Delphi threads? [closed]
I am spawning several threads to make some Web API requests and load data into objects. They just do that job and then finish. Currently, I am using TThread.CreateAnonymousThread().
When those threads ...
-2
votes
0
answers
54
views
Which is the opposite function of ToCharAsUnicode() in Delphi?
I'm looking for a function that converts a JSON escaped text back to plain text in Delphi. I'm not sure if this function exists in the Delphi - I could be wrong.
Practically, I need the opposite of ...
0
votes
0
answers
46
views
SpatiaLite database in Delphi Berlin
Has anyone succeeded using spatiaLite in Delphi (Berlin)?
I have tried to use FireDAC but also to load the sqlite3.dll in code and then load the mod_spatialite.dll, but the module cannot be used. I ...
1
vote
1
answer
107
views
How to convert a large file (more than 10 GiB) from ANSI to UTF-8?
I have a program that makes a backup from my database. When I try to import part of my converted file I get the error:
No mapping for the Unicode character exists in the target multi-byte code page.
...
1
vote
0
answers
49
views
How do I apply user selections to QuickReport preview, correctly and efficiently?
I have an old project using QuickReport in Delphi 10 Seattle. I based the entire solution on the ClosePreview() call.
I tried changing the QRPrinter object, Printer object, or TQuickRep(QRUserPreview....
1
vote
1
answer
42
views
How to add Authorization header to SOAP request with THTTPRIO in Delphi XE7?
I use THTTPRIO in Delphi XE7 to get data from a SOAP server. I try the request with SoapUI without a problem.
POST /ClientServices/ClientServPort.svc HTTP/1.1
Accept-Encoding: gzip,deflate
Content-...
-2
votes
1
answer
126
views
How to convert Chrome's cookie timestamp to a Delphi TDateTime?
I need to convert an integer from a Google Chrome cookie's timestamp to a Delphi TDateTime value.
For instance, this is one value extracted from an example cookie:
1765064691
The 'real' datetime of ...
0
votes
0
answers
41
views
How can one change the default editing window colours in a dbGrid?
I'm using Delphi Tokyo and Devexpress Library V18 from around 2015 or so. When I load a DBGrid and then edit the values, the 'edit window' is white text on a blue background no matter how I paint the ...
-3
votes
0
answers
61
views
TDBAdvGrid and TDBGrid in Delphi always missing the last edited combo field data [closed]
I use the TDBAdvGrid from TMSsoftware. One of the columns use ComboList editor to draw a combobox in this column. When click another cell after editing a combolist column, all works well. But if I ...
1
vote
0
answers
82
views
Delphi 12.1 Community Edition with Android 14
One year ago I could use Delphi 11 CE to develop for Android 14 with success.
I installed one week ago the newest 12.1 Community Edition on a new, clean install Win 11, even java was missing on it. ...
0
votes
2
answers
126
views
Make subclass instantiate itself as a different subclass?
Let's say I have this scenario:
TMyControl = class(TWinControl);
TMyButton = class(TButton);
constructor TMyButton.Create(foo: TMyControl);
begin
inherited Create(foo);
end;
I need a way to make ...
0
votes
0
answers
76
views
Delphi Tcxgrid GetProperties change button caption error
procedure TFrmTySipAyrinti.cxcol_eslestirme_stokidGetProperties(
Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
var AProperties: TcxCustomEditProperties);
var
StokID, i,ColIdx,...
0
votes
0
answers
71
views
Delphi FMX SearchBox
I have a project in Delphi FMX for Android and Windows platform on which I need to have a search box. The search box must have a search string input option, which when a character is entered ...
1
vote
1
answer
88
views
How to get actual background color of TWinControl?
On a form, I have several controls placed on each other, for example:
TForm/TPageControl/TTabSheet/TGroupBox...
I'm trying to obtain the actual background color of the top-most control. How can I do ...
0
votes
1
answer
79
views
How to launch an app from a kiosk app in Android
I started from the Embarcadero template Advanced Android Kiosk Mode that is a kiosk app that launches the device wi-fi settings page.
I want to launch another app instead of the wi-fi settings page.
...
0
votes
0
answers
112
views
How to set sample text in TFontDialog?
How to replace the "AaBb..." sample text? Why is the sample text not shown by default when executing TFontDialog? (it seems to show the text only if I click on a font size, even if I set the ...
0
votes
2
answers
98
views
Extract VERSIONINFO::StringFileInfo blocks
If you are generating a Windows binary, you can write a .rc file similar to the following:
// Version information resource file
#include "windows.h"
1 VERSIONINFO
FILEVERSION 1, 2, 3, 4
...
0
votes
2
answers
99
views
Delphi Firemonkey - Simple FlyOut Menu on Android
I'm using a regular MultiView control for the menu of my app (primary Android). But I also want to have a kind of context menu that drops down when a user taps the menu button in the upper right ...
-1
votes
1
answer
196
views
Is FixedInt 32-bits across all 64-bit and 32-bit platforms?
Short Version
FixedInt is platform-independent, fixed to 32-bits, and (on Windows) is equivalent to LongInt
LongInt is platform-dependent, is not fixed to 32-bits
Which is it?
Long Version
From ...
0
votes
1
answer
138
views
C++Builder 12.2 error: "cannot use C++ 'try' in the same function as SEH '__try'"
After a computer crash and reinstallation of C++Builder 12.2 on a new computer, some code doesn't compile any more. For example:
void __fastcall TSynCustomExporter::CopyToClipboardFormat(UINT AFormat) ...
0
votes
2
answers
150
views
insert into mySQL using Delphi ADOStoredProc
I have a mySQL with the following two tables:
person keyed on ID
staff keyed on ID and StaffID (used to link managers and their staff)
The following stored procedure should insert a row into the ...
3
votes
1
answer
182
views
SQLite function TimeDiff does not seem to be supported by FireDAC in Delphi
I can execute queries directly in SQLite that support the timediff, but if I use a TFDQuery it says the function is not supported. What am I missing?
Update: An example select statement would be
...
0
votes
1
answer
139
views
How can I solve the Enter key not working in Delphi11?
I need help please,
I was programming in Delphi 11 normally, suddenly when I write a code or want to modify a code in unit and press the enter key on keyboard, the writing does not go down, only the ...
0
votes
0
answers
83
views
Authenticated/Authorized CRUDs
I'm learning to code with Delphi 12 and I'm trying to create a simple app for an agenda.
I have a mySQL database set up with 2 tables:
users
id
username
password
appointments
id
user_id (FK)
...
1
vote
1
answer
136
views
Optimal UDP datagram size
I have read a lot of related questions here, however its still quite confusing: how to choose the proper size for an UDP datagrams If the goal is to send data as fast as possible with an allowable ...
0
votes
0
answers
45
views
DBDateTimePicker and entering the date from the keyboard
I have a DBDateTimePicker component.
If I drop down the Calendar and select a date from the list, then in the OnChange event I have this new date (and in the dataset in a given field, there is also ...
2
votes
1
answer
108
views
Formatter Options missing in Delphi 12 after update
I would like to automatically format my Delphi code, but after the RAD Studio 12 update to version 29.0.53571.9782, I don't have anymore the Formatter Options page in Tools > Options > Language &...
0
votes
0
answers
51
views
TCustomTransparentControl is not transparent
I'm trying to use TCustomTransparentControl, but it is not transparent. When creating one with :
TTransparentControl = class(TCustomTransparentControl)
protected
procedure Paint; override;
...
0
votes
0
answers
60
views
How to Continuously Monitor for a Specific Window and Perform Actions Using IUIAutomation in Delphi?
I'm trying to create a thread in Delphi that continuously monitors for a specific window by name and performs a series of actions when the window is detected. The thread should use the IUIAutomation ...
0
votes
0
answers
51
views
Schematic Page idn't being refreshed
I'm trying to define some scripts for Altium Designer using DelphiScript.
In this one i'm making a param updater and i have 2 "problems".
Since i'm able to update/create params and its text, ...
-1
votes
1
answer
65
views
Calculating textwidth of Combobox text in Firemonkey
Using Delphi 12.1 Firemonkey.
Why does this give an access violation due to combobox1.canvas being nil?
TextWidth := combobox1.Canvas.TextWidth('some text');
Is there a correct way to know how much ...
1
vote
2
answers
204
views
Use TDirectory.GetFiles to get the newest file in a folder
I want to get the name of the newest file in a folder by using TDirectory.GetFiles in code. This is what I tried, but this doesn't always return the newest file's name because the predicate function ...
0
votes
1
answer
99
views
TIdHTTPServer hangs when deactivated
First, please refer to a similar but not exactly duplicate question. That question was solved by uninstalling a defective Windows update on Windows server, which is not my case at all (as I'm on ...
0
votes
0
answers
143
views
Delphi executing an external program with two-way interaction
I need to execute a commandline program (.exe) in full interactive mode.
That is, I need to call the executable with a command which turns it into an interactive program. From the Windows command ...
6
votes
1
answer
163
views
Is a resourcestring a string or a record, and do I have to use LoadResString to load it?
In Delphi's Vcl.Buttons unit they call:
Caption := LoadResString(BitBtnCaptions[Value]);
Where BitnBtnCaptions is an array like:
BitnBtnCaptions: array[TBitBtnKind] of Pointer = (
nil, @...
0
votes
0
answers
135
views
Is it possible in Delphi to pass a general parameter to a function and get detailed information about its type and value?
I want to implement a function that accepts a general parameter and provides detailed information about the parameter, such as its type, value, and if it's an object, its properties.
For example, I ...
3
votes
2
answers
123
views
Convert Currency amount to cents without going through floating point
Consider this function:
function DollarsToCents(dollars: Currency): Integer;
begin
result := Trunc(dollars * 100);
end;
The expression dollars * 100 will get converted to an Extended, I believe, ...
0
votes
0
answers
92
views
Issue with concurrent database calls Using ZeosLib
I have a problem with a function that interacts with the database. When I call it sequentially, it works perfectly, but when I call it concurrently, it gives me an error.
Is ZeosLib not thread-safe, ...
0
votes
0
answers
107
views
windows listview virtual mode, Is there a bug when pressing shift to select multiple items?
windows listview virtual mode, Is there a bug when pressing shift to select multiple items ?
c# my code:
private void Form1_Load(object sender, EventArgs e)
{
listView2.VirtualMode ...
4
votes
1
answer
83
views
Delphi 11.2 MSBuild Command line fails
I have a Delphi 11.2 project that builds fine within Delphi but fails on the command line.
In a nutshell, it appears that building via the IDE uses a different version of MSBuild than when building ...
2
votes
2
answers
145
views
How to use Checkboxes in TListView (OwnerData True) in Delphi
I am trying to implement checkboxes in a TListView component with OwnerData=True in Delphi 10.3.3 VCL project.
Here's a minimal example of what I have tried so far:
procedure TForm1.FormCreate(Sender: ...
2
votes
0
answers
93
views
Delphi: VirtualKeyboard events not reliably triggered with Android Gesture Navigation
I’m encountering an issue in a Delphi app when using Android's Gesture Navigation feature. Specifically, the VirtualKeyboard hide and show events are only triggered every second attempt when ...
1
vote
2
answers
132
views
How to hide items in ListView in Delphi?
I'm working on a VCL application in Delphi 10.3.3 and need to temporarily hide some rows (TListItem) in a TListView. Instead of deleting and re-adding the items, I want to make them invisible while ...
1
vote
1
answer
132
views
Delphi false "ifdef" directive editor colouring
I compile my code with include files defining compiler directives, not in project settings, because it's much easier.
Delphi does not interpret this at the editor level, so this makes parts of my ...
2
votes
1
answer
101
views
Preventing Windows Taskbar and Messages from Appearing Over a Fullscreen Delphi FMX Application Running Indefinitely
I have developed a Delphi 10.2. FMX application that runs in fullscreen mode on Windows 10 and 11, displaying animated graphics continuously for extended periods (several months). To maintain an ...
0
votes
0
answers
89
views
Error "Capability not supported" trying to create BDE.TTable with ADT field in Delphi 11
I receive the error "capability not supported" when I try to create a BDE TTable that has a ADT field.
Does not BDE support ADT fields?
The code to reproduce the problem follows
form ...