52,573 questions
0
votes
1
answer
44
views
Scanlines gets wrong pixel colors
I'm working with this image:
I have working code for drawing rectangles on it, which will be filled with the average color of said rectangles:
This is the code for drawing the rectangles:
...
4
votes
0
answers
135
views
How to correctly return from a x64 assembly procedure when .PARAMS is used?
Suppose I have a procedure like this:
procedure DoSomething;
asm
.PARAMS 11 // This will auto-generate "push rbp + sub rsp,$60 + mov rbp,rsp"
// ...
end;
Suppose I need to return from ...
0
votes
1
answer
73
views
Redemption GetFreeBusy fails with Office 365 (HTTP 401 Autodiscover) in 64-bit Delphi app
I have a 64-bit Delphi application using Redemption 5.27 (64-bit) to retrieve Outlook Free/Busy information.
Environment:
Office 365 (64-bit Outlook)
Redemption 5.27 (64-bit)
Outlook running with a ...
1
vote
1
answer
107
views
Delphi Anonymous methods internal interfaces why created only once in a loop
I know in Delphi, anonymous methods is implemented as interfaces.
After some debugging, I found that at the beginning of the function Test, the anonymous interface object is constructored, and during ...
1
vote
0
answers
43
views
Delphi 12.2 provisioning doesn't save configuration
I'm using Delphi 12.2 on Win11 for a Windows app. I have a generated PFX to use for signing. In Project Options > Deployment > Provisioning for all 64-bit Windows platforms, I set the build ...
0
votes
2
answers
62
views
How to fix BRCC32 Error : Allocate failed
I'm using Delphi 12.
I have a RC file that I put every images of my application inside, and compile it with BRCC32.
Now I'm trying to insert also the main icon file on the RC file, like so :
MAINICON ...
Tooling
1
vote
4
replies
32
views
Delphi 13 macOS app and Drag & Drop launch
How can I launch a macOS application I wrote in Delphi Embarcadero 13, with the drag-and-drop document icon (associated via Info.plist with myAPP)?
Asking to Claude and ChatGPT seems to be a bit ...
Best practices
0
votes
5
replies
56
views
Delphi: How get a daily report and/or report by date and/or hour from Epson FP-81II RT receipt printer
I need to check the daily report from Epson FP-81II RT receipt printer BEFORE close the work and send the data to the appropriate office. It is possible using keyboard command but the printer "re-...
0
votes
1
answer
98
views
Delphi 11+ 64-bit executable: How do I specify which DLLs to load when Indy 10 initializes OpenSSL?
I have a set of 64-bit DLLs, but the standard DLL names for the 64-bit DLL names clash with the 32-bit DLL names. We should probably not mix 32-bit and 64-bit and have their .exes and .dlls in ...
1
vote
2
answers
149
views
Can I use Canvas.Pen.Style when Canvas.Pen.Width > 1?
It seems not. I am using Canvas.Polyline([P1, P2]); (even though it is always a straight line with only two points - is there a better alternative?).
Styles like psDash, psDot, etc render correctly ...
0
votes
0
answers
80
views
How can I have text next to my axis left and bottom in TMS FNC Charts within FMX?
I am trying to recreate this chart in TMS FNC Charts:
This is what I have so far:
procedure TfrmGraphTemperature.InitializeChart;
begin
Chart.BeginUpdate;
try
Chart.Series.Clear;
var ...
0
votes
0
answers
67
views
Crystal Reports - Printer selection disabled in print dialog, how to enable it?
I am using Delphi 7 with Crystal Reports XI (11) via the TCrpe (VCL) component.
When I print a report, Crystal shows the following Print dialog.
It only shows:
System Printer (Microsoft Print to PDF)
...
0
votes
0
answers
134
views
There is a black line at the top and bottom of iOS 26
I have found that iOS application developed using Delphi FireMonkey, running on iOS 26 version, have approximately 1 pixel black lines at the top and bottom.
Application screenshot:
Is there anything ...
0
votes
0
answers
101
views
Webview2 attempt to set element style using javascript results in "cannot set properties of undefined" error
I am using Delphi to load a document from a file using WebView2 (TEdgeBrowser). I am trying to add blank space to the bottom of the document. The document looks like this:
<?xml version="1.0" ...
3
votes
1
answer
143
views
Draw a rectangle on the corner of the TCalendarView items
I try to draw a triangle in the corner of my TCalenderView items under certain conditions (I've simplified the code here to just highlight the odd dates).
The DrawTriangle function that I added was ...
0
votes
1
answer
154
views
How to build a DEBUG version of my app using dcc64?
I am using this to build my application in RELEASE mode:
dcc64 '-$D-' '-$L-' '-$Y-' '-O+' '-$Q-' '-$R-' 'MyApp.dpr'
How do I build in DEBUG mode?
I need DEBUG mode because I have compiler directives ...
0
votes
1
answer
66
views
dcc32 Error MultiTabEditor.pas(425): E2010 Incompatible types: 'tagLOGFONTW' and 'Pointer'
I found this Topic Receive Access violation..., which is a similar issue I am facing here, but mine has the correct cast.
What I am trying to accomplish is select a font from a listbox, and have the ...
2
votes
1
answer
133
views
Delphi Indy UDP broadcast failing
I'm using Delphi 12.3 w/ Indy on a machine with multiple network adapters. I have industrial devices connected to the various adapters. The devices look for a UDP query packet on port 11864 with a ...
4
votes
1
answer
134
views
How do I include an image from resources in my TWebBrowser page in Delphi?
In my Delphi 11.3 (on Windows 11) program I have a TWebBrowser component which shows an HTML page from resources. The resources also contain an image. How can I refer to the image resource in the src ...
2
votes
1
answer
154
views
How to translate a C struct with an anonymous union — where to place fields after the union? [duplicate]
I'm translating a Windows CryptoAPI C struct to Delphi, and I'm struggling with the correct Delphi record syntax when a field comes after an anonymous union.
C struct:
typedef struct ...
-1
votes
1
answer
110
views
Project raised exception class 'External: SIGFPE' [closed]
I’m getting a runtime crash in a Lazarus (Free Pascal) application when clicking a TImage that saves/loads an image BLOB from a database.
Project Album raised exception class 'External: SIGFPE'.
At ...
1
vote
1
answer
143
views
Certificate error with Indy TaurusTLS and Delphi 13 FMX
My Delphi 13 32-bit FMX project using Indy and TaurusTLS is throwing this exception:
Project ProjectMikeTaurus.exe raised exception class ETaurusTLSLoadingCertError with message Could not load ...
1
vote
2
answers
265
views
What features from Windows SDK is required to install RAD Studio 13?
When installing RAD Studio 13 it says I first need to install the Windows SDK:
The Windows SDK is quite large though.
Do I need to install everything from the Windows SDK or is there something ...
3
votes
2
answers
122
views
How do I set folder location for .dcu files without Delphi IDE?
Right now, I don't have access to the Delphi IDE because all of the licenses are currently checked out at my company. I am working with only Visual Studio Code in the next couple of days.
Without the ...
3
votes
0
answers
145
views
Get Delphi 13 Indy to support HTTPS REST requests
I'm using Delphi 13 and the TIdHTTPWebBrokerBridge to create a 32-bit FMX REST server called PocketGMServer.exe.
It's hosted on an Amazon LightSail Windows 2022 instance.
Everything works as expected ...
0
votes
4
answers
185
views
Delphi IDE shortcut key for cleaning project
I know that I can press F9 to Compile/Run my project.
Is there a shortcut key to Clean my project, or a way to set a shortcut key for this?
I hate having to right click and select to Clean manually ...
2
votes
0
answers
146
views
Content is highlighted in SynEdit, but colors are lacking
I am trying to get started with the SynEdit library for Delphi, but documentation seems to be sparse. Anyway, the following code does show my code highlighted in the exported HTML file (also in the ...
2
votes
3
answers
163
views
How to use .vsf styles in Delphi FMX?
When I download styles from GetIt Package Manager, they come in .vsf format. How do I actually use them in Delphi FMX?
Delphi FMX TStyleBook requires .style or .fsf, NOT .vsf.
I am trying the "...
1
vote
3
answers
237
views
Drawing USA Flag using TPaintBox in FMX
I am trying to draw an accurate USA flag (to be used for language selection).
I am not good at drawing stuff with TPaintBox or anything else.
This is what I've been able to do so far with code to draw ...
Best practices
0
votes
5
replies
157
views
How to create a universal solution for working with databases using Delphi Community Edition?
Could you please advise on how to create a universal solution for working with databases using Delphi Community Edition? I’d appreciate guidance on best practices, recommended components (such as ...
2
votes
0
answers
107
views
How to stop my THorse controller from executing after the middleware sends a 401 error?
I am trying to build an API in Delphi 12 CE using THorse.
I have setup middleware to handle the authorization, but it does not stop there.
My project file (simplyfied):
begin
dmMain := TdmMain....
3
votes
1
answer
118
views
Can I hide Font.Color in Delphi's Object Inspector?
I made a component derived from TCustomControl, for which I published the Font property. It shows up in the Object Inspector alright, but now I want to hide the Color sub property, while keeping the ...
2
votes
1
answer
131
views
Delphi ignores selected vs deselected items in TListbox ownerdraw
I have an ownerdraw Tlistbox where I want the selected item (Multiselect is set to False) in white against a blue background, and the other items black on white, like this:
This is my code:
procedure ...
Advice
1
vote
3
replies
152
views
Is there a way to inherit nested types?
We're using an attribute, which looks somewhat like this (simplified):
unit SomeProject.ThreadLibrary.Attributes;
interface
type
ThreadAffinityAttribute = class (TCustomAttribute)
...
1
vote
0
answers
84
views
How to manually install Active Query Builder in Delphi 13 (Florence)?
I'm a current registered user of Active Query Builder (with sources), but it seems that noone has answered questions in the forum for 2 or 3 years.
Does anyone know anything about it, and how to ...
1
vote
1
answer
289
views
How to detect if there's a Windows Update available using Delphi code?
I need to know from within my app whether the person has a pending Windows Update available or not, and then prompt him to update his Windows if it's not updated yet.
Is there a way to check if an ...
0
votes
2
answers
195
views
Is there a way to detect UEFI from a Delphi App?
I want to know if the computer I'm using has UEFI or Legacy BIOS.
Is it somehow possible to detect this from Delphi code?
I found ExGetFirmwareEnvironmentVariable which seem interesting, but I'm not ...
-1
votes
1
answer
167
views
How to get the names of my active monitors using Delphi VCL? [duplicate]
I found this function that is supposed to get the names of all the actively plugged-in monitors on the computer:
function GetMonitorNames: TArray<string>;
begin
Result := [];
var ...
0
votes
1
answer
119
views
How to get the active monitor count in Delphi VCL?
I'm trying to get the count for the amount of monitors on my computer using VCL and Delphi.
For my purposes, it only needs to work on Windows 11 and Delphi 13. I don't care about older versions.
Is ...
2
votes
1
answer
190
views
Select a new monitor as a display using VCL
I want to switch my application from one monitor to another. The code below work many times perfectly as expected but sometimes it only moved the titlebar of my application to the new screen.
How to ...
0
votes
0
answers
279
views
How to configure VSCode/Cursor that it respect current file encoding while opening file (Delphi WIN-1257 files)
I am developing Delphi 2009+ projects and my Delphi *.pas files has UTF8 encodings (when initially created and when edited and saved up to the point when non-English comments or string constants are ...
1
vote
2
answers
167
views
How can I know the new tab index value in the OnChanging event of a TTabControl?
I'm using Delphi 13. I have a TTabControl with 4 tabs on my form. TTabControl has the events OnChanging (before the tab change is actually made), and OnChange (after the change). Apart from the Sender ...
2
votes
2
answers
176
views
Scale form at design time, but only control positions (to give more air)
I want to make a general design change in all the forms of my VCL application: I want to space all controls with more air between them. The ultimate goal is to make it look more like a (React) web app,...
2
votes
0
answers
114
views
Custom TMS Web Core Component not showing in the IDE Web Designer (Web with Designer)
I am currently evaluating TMS Web Core 2.9, and I am seriously considering purchasing it.
Im usi templates and one of the most important features for me is the ability to:
create my own custom ...
6
votes
0
answers
128
views
Detect dark / night mode on iOS using Delphi
With Delphi 12 I use IFMXSystemAppearanceService to detect if my device is in dark mode. It works on Android and MacOS but not on iOS. I always get light value.
function TThemeNotifier.GetSystemMode:...
2
votes
1
answer
152
views
Can't create MSIX in Delphi 12, as build type always reverts to "windows 32-bit - Normal"
Every time I open the "deployment / provisioning" tab in the build configuration, it always reverts to a build type of "windows 32-bit - Normal", no matter how many times I change ...
Best practices
1
vote
5
replies
177
views
Encoding character data in a constant array of bytes
Defining a string and converting it to bytes at runtime is one thing, but I would want to have a constant array of bytes defined at design time and then pupulate it with a mix of bytes and strings.
...
1
vote
1
answer
158
views
Delphi 12.1 and Indy 10 - TIdTCPClient impact on CPU load
I am using Delphi 12.1 and Indy 10 to implement a client/server application.
The client (running on Windows) requests data and then waits until the server responds.
The server (FreeRTOS + sockets) ...
0
votes
1
answer
243
views
How to open "Wine Control Panel" when running my app through Wine/Proton?
I want to let my users be able to open the "Wine Control Panel" from within the app using a button click event.
This is what I'm talking about:
Is this possible from a Windows app running ...
0
votes
0
answers
206
views
"Could not convert variant of type (Null) into type (OleStr)" - Only one one Dev PC
Using Delphi 10.3, FireDAC, 64 bit application, MySQL. Error:
Could not convert variant of type (Null) into type (OleStr)
Really simple query as a test:
FDQuery1.Close;
FDQuery1.Sql.Clear;
FDQuery1....