<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:re="http://purl.org/atompub/rank/1.0">
    <title type="text">Newest questions tagged delphi - Stack Overflow</title>
    <link rel="self" href="https://stackoverflow.com/feeds/tag?tagnames=delphi&amp;sort=newest" type="application/atom+xml" />
    <link rel="alternate" href="https://stackoverflow.com/questions/tagged?tagnames=delphi&amp;sort=newest" type="text/html" />
    <subtitle>most recent 30 from stackoverflow.com</subtitle>
    <updated>2026-07-12T01:42:00Z</updated>
    <id>https://stackoverflow.com/feeds/tag?tagnames=delphi&amp;sort=newest</id>
    <creativeCommons:license>https://creativecommons.org/licenses/by-sa/4.0/rdf</creativeCommons:license> 
    <entry>
        <id>https://stackoverflow.com/q/79972126</id>
        <re:rank scheme="https://stackoverflow.com">2</re:rank>
        <title type="text">Delphi 13 , compile error using old source code with DUNITX</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="dunit" />
        <author>
            <name>Franz</name>
            <uri>https://stackoverflow.com/users/1362082</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79972126/delphi-13-compile-error-using-old-source-code-with-dunitx" />
        <published>2026-07-01T11:52:31Z</published>
        <updated>2026-07-07T10:21:23Z</updated>
        <summary type="html">
            &lt;p&gt;I have moved my  code over many Delphi versions - without any change  on the  code base .&lt;/p&gt;&#xA;&lt;p&gt;The upgrade from Delphi 10.4 to Delphi 13 for my dunitx testcases failed :&lt;/p&gt;&#xA;&lt;p&gt;Working code Delphi 10.4&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;assert.AreEqual(aList.Count, 3, &#x27;Items count OK ?&#x27;);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;New Working code Delphi 13.1&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;assert.AreEqual&amp;lt;Integer&amp;gt;(aList.Count,Integer(3), &#x27;Items count OK ?&#x27;);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Did the  Delphi compiler  become worse ?   .....  because the compiler cannot automatically determine the type parameter for the generic any longer ??&lt;/p&gt;&#xA;&lt;p&gt;Has my previous old solution been wrong ?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79970406</id>
        <re:rank scheme="https://stackoverflow.com">-1</re:rank>
        <title type="text">Only final project in Project Group (bpg) runs correctly [closed]</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-7" />
        <author>
            <name>AlainD</name>
            <uri>https://stackoverflow.com/users/2377399</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79970406/only-final-project-in-project-group-bpg-runs-correctly" />
        <published>2026-06-29T15:55:09Z</published>
        <updated>2026-07-02T13:48:44Z</updated>
        <summary type="html">
            &lt;p&gt;My Delphi project group (.bpg) has three projects:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;PROJECTS = Proj1.exe Proj2.exe Proj3.exe&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;When loaded in the IDE, I can switch between (activate) projects. All projects build correctly and can be debugged. The EXEs can also be launched from outside the IDE.&lt;/p&gt;&#xA;&lt;p&gt;The problem is the &lt;code&gt;Run Without Debugging&lt;/code&gt; option in the IDE. Only the final project (&lt;code&gt;Proj3&lt;/code&gt;) is able to use &lt;code&gt;Run Without Debugging&lt;/code&gt;...all the others produce an error:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;System Error. Code 2.The system cannot find the file specified.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I have tried the following:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Changed the order of projects in the .bpg. The result is the same: &lt;em&gt;only&lt;/em&gt; the final project can use &lt;code&gt;Run Without Debugging&lt;/code&gt; - the others produce error code 2. Regardless of the order, all projects build correctly and can be debugged.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Closed the project group and loaded each project separately in their own IDE. The result is that all work correctly: build, can be debugged, and can use &lt;code&gt;Run Without Debugging&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Is this a way around this problem?&lt;/p&gt;&#xA;&lt;h3&gt;Update&lt;/h3&gt;&#xA;&lt;p&gt;Thanks to @HeartWave for taking the time to understand the problem and providing a working solution. See the accepted answer.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79968964</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">Delphi IDE issue &quot;no code formatting possible&quot;</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-ide" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-13-florence" />
        <author>
            <name>Franz</name>
            <uri>https://stackoverflow.com/users/1362082</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79968964/delphi-ide-issue-no-code-formatting-possible" />
        <published>2026-06-28T14:17:24Z</published>
        <updated>2026-07-01T16:11:04Z</updated>
        <summary type="html">
            &lt;p&gt;I have a strange issue with a recent installation of Delphi 13: The functions &amp;quot;&lt;em&gt;Format Source&lt;/em&gt;&amp;quot;  and &amp;quot;&lt;em&gt;Refactor&lt;/em&gt;&amp;quot; are disabled.  What happened to my installation? Where can I fix this issue?&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.sstatic.net/JXv6GQ2C.png&quot; alt=&quot;context menu with disabled entries&quot; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;Screen dump: &amp;quot;&lt;em&gt;Format Source Ctrl&#x2B;D&lt;/em&gt;&amp;quot; is disabled in the context menu.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79965901</id>
        <re:rank scheme="https://stackoverflow.com">6</re:rank>
        <title type="text">Possible Delphi Win64 Debugger Bug: Volatile registers (RCX/RDX) truncated to 32-bit after breakpoints under heavy multithreaded load</title>
            <category scheme="https://stackoverflow.com/tags" term="windows" />
            <category scheme="https://stackoverflow.com/tags" term="debugging" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="assembly" />
            <category scheme="https://stackoverflow.com/tags" term="x86-64" />
        <author>
            <name>Zolt&#xE1;n B&#xED;r&#xF3;</name>
            <uri>https://stackoverflow.com/users/8097334</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79965901/possible-delphi-win64-debugger-bug-volatile-registers-rcx-rdx-truncated-to-32" />
        <published>2026-06-23T13:52:22Z</published>
        <updated>2026-06-24T21:34:56Z</updated>
        <summary type="html">
            &lt;p&gt;I am developing a high-performance PS/PDF RIP workflow engine in Delphi (Win64 target). The rendering engine relies heavily on multithreading and custom assembly blocks (AVX/YMM instructions for RLE processing).&lt;/p&gt;&#xA;&lt;p&gt;I recently encountered a severe &#x201C;Heisenbug&#x201D;: the application runs flawlessly in Release mode, &#x201C;&lt;em&gt;Run without debugging&lt;/em&gt;&#x201D; (Ctrl&#x2B;Shift&#x2B;F9) or even &#x201C;&lt;em&gt;Run&lt;/em&gt;&#x201D; (F9) in Debug mode. However, when breakpoints are used, stepping over certain breakpoints causes random, catastrophic Access Violations deep inside the assembly routines.&lt;/p&gt;&#xA;&lt;p&gt;Since placing breakpoints altered the timing and masked the issue, I wrote a custom, nearly zero-overhead, lock-free logger using &lt;code&gt;lock xadd&lt;/code&gt; and &lt;code&gt;rdtsc&lt;/code&gt; instructions to time-stamp the event and dump raw CPU registers into a pre-allocated memory block without waking the OS thread scheduler.&lt;/p&gt;&#xA;&lt;p&gt;What the lock-free logger revealed was shocking. Under heavy thread contention, if a thread hits a breakpoint and pauses, resuming it (F9) &lt;strong&gt;occasionally&lt;/strong&gt; causes &lt;strong&gt;64-bit parameter register corruption&lt;/strong&gt; (RCX, RDX, etc.). This happened when I placed the breakpoint right on the place I called the virtual assembly routine from (logging immediately before the call, and at the very first line of the assembly routine).&lt;/p&gt;&#xA;&lt;p&gt;For example, my logger captured RCX entering a routine as a valid 64-bit pointer:&lt;br /&gt;&#xA;&lt;code&gt;PRE-BREAKPOINT: 00007FF49F698690&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;After the IDE paused on the breakpoint and I pressed F9 to resume, the immediate next instruction logged the exact same register as:&lt;br /&gt;&#xA;&lt;code&gt;POST-BREAKPOINT: 000000009F698690&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The upper 32 bits were completely zeroed out, effectively decapitating the pointer and causing an immediate access violation when dereferenced.&lt;/p&gt;&#xA;&lt;p&gt;This likely does &lt;em&gt;not&lt;/em&gt; happen in a simple, single-threaded test app. It only manifests under heavy CPU load, with dozens of threads actively rendering and allocating memory, and only after multiple iterations of hitting a breakpoint.&lt;/p&gt;&#xA;&lt;p&gt;Such a decapitated CPU register strongly points to a possible registers&#x2019; restoration bug in Delphi. Moreover, I can&#x2019;t see how a thread can affect other threads&#x2019; CPU data.&lt;/p&gt;&#xA;&lt;p&gt;So, is this a known (or at least suspectable) architectural flaw in the Delphi 64-bit debugger&#x27;s context restoration under stress? Or, Delphi is right here and there is rather a deeply obscure bug in my code?&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Embarcadero&#xAE; Delphi 13 Version 37.0.59082.6021&lt;/em&gt; &lt;em&gt;(32-bit)&lt;/em&gt;&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79963066</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">How to find Google Drive&#x27;s assigned letter?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="google-drive-api" />
        <author>
            <name>stevenvh</name>
            <uri>https://stackoverflow.com/users/66056</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79963066/how-to-find-google-drives-assigned-letter" />
        <published>2026-06-19T09:02:11Z</published>
        <updated>2026-06-22T11:48:04Z</updated>
        <summary type="html">
            &lt;p&gt;I have a Delphi program which needs to know Google Drive&#x27;s drive letter. It appears that the default friendly name is &amp;quot;Google Drive&amp;quot;, so I enumerate my drives and look for that text. This works, but this friendly name can be modified by the user.&lt;/p&gt;&#xA;&lt;p&gt;How can I find Google Drive&#x27;s drive letter more reliably? I searched the registry, but couldn&#x27;t find the currently assigned drive letter (default, &amp;quot;G:\&amp;quot;).&lt;/p&gt;&#xA;&lt;p&gt;OS is Windows 11.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79960604</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">In Delphi, how to use the &#x27;implements&#x27; directive with a generic interface type?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="generics" />
        <author>
            <name>Richard Shuck</name>
            <uri>https://stackoverflow.com/users/12215803</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79960604/in-delphi-how-to-use-the-implements-directive-with-a-generic-interface-type" />
        <published>2026-06-16T11:17:29Z</published>
        <updated>2026-06-18T21:30:01Z</updated>
        <summary type="html">
            &lt;p&gt;I want to contain an interface instance inside a container instance while being able to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;synchronize lifetime&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;not alter the contained instance&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;be able to resolve the inner interface from the outer, and vice versa&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The problem is that the &lt;code&gt;implements&lt;/code&gt; directive does not support generic types. It gives this error:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;interface type required&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;  IStoreOption = interface&#xA;    [&#x27;{FC40203E-104F-488D-B7B7-4B0D831F6150}&#x27;]&#xA;    procedure Read(Value: IConnection);&#xA;    procedure Write(Value: IConnection);&#xA;  end;&#xA;&#xA;  ITest = interface&#xA;    [&#x27;{84F0DD99-34C6-433D-9FA1-5DAB8BED3386}&#x27;]&#xA;    procedure SayHello;&#xA;  end;&#xA;&#xA;  TTest = class(TInterfacedObject, ITest)&#xA;  protected&#xA;    procedure SayHello;&#xA;  end;&#xA;&#xA;  TStoreOption&amp;lt;T: IInterface&amp;gt; = class(TInterfacedObject, IStoreOption, T)&#xA;  private&#xA;    fValue: T;&#xA;  protected&#xA;    property Value: T read fValue implements T;&#xA;  public&#xA;    constructor Create(Value: T);&#xA;    procedure Read(Value: IConnection);&#xA;    procedure Write(Value: IConnection);&#xA;  end;&#xA;&#xA;  function GetTest: ITest;&#xA;  begin&#xA;    var StoreOption := TStoreOption&amp;lt;ITest&amp;gt;.Create(TTest.Create) as IStoreOption;&#xA;    Supports(StoreOption, ITest, Result);&#xA;  end;&#xA;&#xA;  procedure Save(Value: IInterface);&#xA;  begin&#xA;    var StoreOption: IStoreOption;&#xA;    if Supports(Value, IStoreOption, StoreOption) then&#xA;      StoreOption.Write(Connection);&#xA;  end;&#xA;&#xA;  procedure RunTest;&#xA;  begin&#xA;    Save(GetTest);&#xA;  end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;How can I implement this correctly so it works?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79953130</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">How to migrate Indy to 64bit OpenSSL DLLs?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="indy" />
            <category scheme="https://stackoverflow.com/tags" term="indy10" />
        <author>
            <name>delphirules</name>
            <uri>https://stackoverflow.com/users/1718632</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79953130/how-to-migrate-indy-to-64bit-openssl-dlls" />
        <published>2026-06-08T17:09:39Z</published>
        <updated>2026-06-09T15:47:33Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x27;m in the process of migrating my Delphi 12 apps from 32bit to 64bit. Currently I&#x27;m using Indy with the 32bit OpenSSL DLLs (libeay32.dll and ssleay32.dll).&lt;/p&gt;&#xA;&lt;p&gt;When I change to 64bit and try to run the app, I get the &#x27;Could not load SSL library&#x27; error. Then I went to GitHub to download 64bit versions of these DLLs from &lt;a href=&quot;https://github.com/IndySockets/OpenSSL-Binaries&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://github.com/IndySockets/OpenSSL-Binaries&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Downloaded the file, but there are a lot of folders inside like:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;openssl-1.0.2q-x64_86-win64&#xA;openssl-1.0.2r-x64_86-win64&#xA;openssl-1.0.2s-x64_86-win64&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Tried to use the first one, but still get the same exception. Which one should I use? Even the DLLs inside the x64 folders have &#x27;32&#x27; in their name, so I&#x27;m confused.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79951852</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">AfterPost or AfterDelete</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="firedac" />
        <author>
            <name>David Jim&#xE9;nez</name>
            <uri>https://stackoverflow.com/users/2391146</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79951852/afterpost-or-afterdelete" />
        <published>2026-06-05T11:56:53Z</published>
        <updated>2026-06-06T05:56:06Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x2019;m working with Delphi 10.4.2, VCL, &lt;code&gt;FireDAC&lt;/code&gt; and &lt;code&gt;EhLib&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In a real application, I have a &lt;code&gt;TFDMemTable&lt;/code&gt; connected to &lt;code&gt;EhLib&lt;/code&gt; data-aware controls, mainly &lt;code&gt;TDBGridEh&lt;/code&gt; and &lt;code&gt;TDBEditEh&lt;/code&gt;. The dataset is loaded from JSON, using &lt;code&gt;CreateDataSet()&lt;/code&gt; / &lt;code&gt;Append()&lt;/code&gt; / field assignment / &lt;code&gt;Post()&lt;/code&gt;. During the JSON load I temporarily disable dataset events and restore them afterwards.&lt;/p&gt;&#xA;&lt;p&gt;The issue is that in the application, in &lt;em&gt;Release&lt;/em&gt; mode, the &lt;code&gt;TFDMemTable&lt;/code&gt; fires &lt;code&gt;BeforePost&lt;/code&gt; and &lt;code&gt;BeforeDelete&lt;/code&gt;, but it does not fire &lt;code&gt;AfterPost&lt;/code&gt; or &lt;code&gt;AfterDelete&lt;/code&gt;. The same &lt;code&gt;TFDMemTable&lt;/code&gt; does fire those &lt;code&gt;After*&lt;/code&gt; events in an isolated test.&lt;/p&gt;&#xA;&lt;p&gt;Some relevant details:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;TFDMemTable&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;VCL application&lt;/li&gt;&#xA;&lt;li&gt;Delphi 10.4.2&lt;/li&gt;&#xA;&lt;li&gt;EhLib controls: &lt;code&gt;TDBGridEh&lt;/code&gt;, &lt;code&gt;TDBEditEh&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;Delete&lt;/code&gt; is triggered from &lt;code&gt;TDataSetDelete&lt;/code&gt; / grid UI&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;UpdateOptions.AutoCommitUpdates = True&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ResourceOptions.SilentMode = True&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;BeforePost&lt;/code&gt; fires&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;BeforeDelete&lt;/code&gt; fires&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;AfterPost&lt;/code&gt; does not fire&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;AfterDelete&lt;/code&gt; does not fire&lt;/li&gt;&#xA;&lt;li&gt;In an isolated test, the events do fire&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Is there any known interaction between EhLib data-aware controls and &lt;code&gt;TFDMemTable&lt;/code&gt; that could prevent &lt;code&gt;AfterPost&lt;/code&gt; / &lt;code&gt;AfterDelete&lt;/code&gt; from being fired, or alter the dataset state/action flow in a way that skips those events?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79951487</id>
        <re:rank scheme="https://stackoverflow.com">2</re:rank>
        <title type="text">Interlocked functions on unsigned variables</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="unsigned" />
            <category scheme="https://stackoverflow.com/tags" term="interlocked" />
        <author>
            <name>vincent</name>
            <uri>https://stackoverflow.com/users/1409617</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79951487/interlocked-functions-on-unsigned-variables" />
        <published>2026-06-04T15:49:10Z</published>
        <updated>2026-06-04T19:31:21Z</updated>
        <summary type="html">
            &lt;p&gt;what is the safe and correct way to atomically write unsigned variables using the Interlocked* functions or TInterlocked?&lt;/p&gt;&#xA;&lt;p&gt;In the function below, are (A) and (B) fully atomic and threadsafe?&lt;br /&gt;&#xA;Or is (C) or (D) required?&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;procedure TForm1.Button3Click(Sender: TObject);&#xA;var&#xA;  tLastReload: UInt64;&#xA;begin&#xA;  TInterlocked.Exchange(Int64(tLastReload),1);  //A&#xA;  InterlockedExchange64(Int64(tLastReload),2);  //B&#xA;&#xA;  TInterlocked.Exchange(PInt64(@tLastReload)^,3); //C&#xA;  InterlockedExchange64(PInt64(@tLastReload)^,4); //D&#xA;end;&#xA;&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79951413</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">DELPHI : [dcc64 Fehler] E1026 File not found : &#x27;DUnitX.Loggers.GUI.VCL.dfm&#x27;</title>
            <category scheme="https://stackoverflow.com/tags" term="windows" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="dunit" />
        <author>
            <name>Franz</name>
            <uri>https://stackoverflow.com/users/1362082</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79951413/delphi-dcc64-fehler-e1026-file-not-found-dunitx-loggers-gui-vcl-dfm" />
        <published>2026-06-04T13:27:15Z</published>
        <updated>2026-06-25T18:22:14Z</updated>
        <summary type="html">
            &lt;p&gt;I need some help getting  my DUNIT testcases up and compiling again after  the upgrade to DELPHI 11.&lt;/p&gt;&#xA;&lt;p&gt;This is the top of my command-line testcase program; it is compiling and functional.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;{$IFNDEF TESTINSIGHT}&#xA;{$APPTYPE CONSOLE}&#xA;{$ENDIF}{$STRONGLINKTYPES ON}&#xA;uses&#xA;  {$IFDEF TESTINSIGHT}&#xA;  TestInsight.DUnitX,&#xA;  {$ENDIF }&#xA;  System.SysUtils,&#xA;  DUnitX.Loggers.Console,&#xA;  DUnitX.Loggers.Xml.NUnit,&#xA;  //DUnitX.Loggers.GUI.VCL,&#xA;  DUnitX.TestFramework,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The GUI Version is basically the same, but here the unit :  &#x27;DUnitX.Loggers.GUI.VCL.dfm&#x27;  is needed .&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;{$R *.res}&#xA;uses&#xA;  Vcl.Forms,&#xA;  System.SysUtils,&#xA;  DUnitX.Loggers.XML.NUnit,&#xA;  DUnitX.Test,&#xA;  DUnitX.TestFixture,&#xA;  DUnitX.TestFramework,&#xA;  DUnitX.TestResult,&#xA;  DUnitX.RunResults,&#xA;  DUnitX.TestRunner,&#xA;  DUnitX.Utils,&#xA;  DUnitX.WeakReference,&#xA;  DUnitX.Windows.Console,&#xA;  DUnitX.Loggers.Null,&#xA;  DUnitX.MemoryLeakMonitor.Default,&#xA;  DUnitX.AutoDetect.Console,&#xA;  DUnitX.ConsoleWriter.Base,&#xA;  DUnitX.Extensibility,&#xA;  DUnitX.Extensibility.PluginManager,&#xA;  DUnitX.FixtureProviderPlugin,&#xA;  DUnitX.FixtureResult,&#xA;  DUnitX.Generics,&#xA;  DUnitX.InternalInterfaces,&#xA;  DUnitX.IoC,&#xA;  DUnitX.Loggers.Console,&#xA;  DUnitX.CommandLine.OptionDef,&#xA;  DUnitX.CommandLine.Options,&#xA;  DUnitX.CommandLine.Parser,&#xA;  DUnitX.OptionsDefinition,&#xA;  DUnitX.Banner,&#xA;  DUnitX.FilterBuilder,&#xA;  DUnitX.Filters,&#xA;  DUnitX.CategoryExpression,&#xA;  DUnitX.TestNameParser,&#xA;  // DUnitX.Loggers.GUI.VCL,&#xA;  DUnitX.Timeout,&#xA;  DUnitX.Exceptions,&#xA;  DUnitX.ResStrs,&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The  compiler claims the unit   has  not been found. If I try to  remove this  unit, compilation fails here&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;Application.CreateForm(TGUIVCLTestRunner, GUIVCLTestRunner);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Q:   how to fix my  DUNITX installation ,  why is this  unit not found&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79950715</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">DELPHI : Working with many different monitor config&#x27;s</title>
            <category scheme="https://stackoverflow.com/tags" term="windows" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
        <author>
            <name>Franz</name>
            <uri>https://stackoverflow.com/users/1362082</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79950715/delphi-working-with-many-different-monitor-configs" />
        <published>2026-06-03T08:38:37Z</published>
        <updated>2026-06-04T10:32:21Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x27;m using Delphi 11 and have upgraded from Delphi 10.4. Since the upgrade, I&#x27;ve noticed some very weird behavior in the Delphi IDE. Whenever I load a new project, the IDE shrinks to a minimized/tiny window (about 300 px &#xD7; 50 px) on my monitor. I then have to click the maximize button (top-right) to restore it.&lt;/p&gt;&#xA;&lt;p&gt;Moreover, some of the dialog windows do not match in size correctly, therefore the &amp;quot;OK&amp;quot; button is not visible and I can&#x27;t use the function.&lt;/p&gt;&#xA;&lt;p&gt;Additionally, Delphi always jumps to my first monitor, but I want Delphi to always stay on Monitor #2.&lt;/p&gt;&#xA;&lt;p&gt;I have several physical workplaces, and each place has a different monitor configuration. In my home office, I have the laptop display and 2 additional 4K monitors with different resolutions.&lt;/p&gt;&#xA;&lt;p&gt;I want Delphi always to open  on monitor #2 and  full window mode.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79950586</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">Possible race in TIdUDPServer.CloseBinding: listener thread keeps raw Binding reference while CloseBinding closes it before WaitFor</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="indy" />
        <author>
            <name>Sargis</name>
            <uri>https://stackoverflow.com/users/8050679</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79950586/possible-race-in-tidudpserver-closebinding-listener-thread-keeps-raw-binding-re" />
        <published>2026-06-03T02:50:21Z</published>
        <updated>2026-06-03T18:46:59Z</updated>
        <summary type="html">
            &lt;p&gt;I am investigating an intermittent AV during rapid &lt;code&gt;TIdUDPServer.Active := False/True&lt;/code&gt;&#xA;cycles in a Delphi 12.2 application.&lt;/p&gt;&#xA;&lt;p&gt;The crash happens in the UDP close path, at:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;TIdUDPServer.CloseBinding&#xA;  LListener.Binding.CloseSocket;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I checked the stock Indy source shipped with Delphi 12.2:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;C:\Program Files (x86)\Embarcadero\Studio\23.0\source\Indy10\Core\IdUDPServer.pas&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The relevant code has this ownership/order pattern:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;procedure TIdUDPServer.CloseBinding;&#xA;begin&#xA;  LListenerThreads := FListenerThreads.LockList;&#xA;  try&#xA;    while LListenerThreads.Count &amp;gt; 0 do begin&#xA;      LListener := TIdUDPListenerThread(LListenerThreads[0]);&#xA;&#xA;      LListener.Stop;&#xA;      LListener.Binding.CloseSocket;&#xA;      LListener.WaitFor;&#xA;      LListener.Free;&#xA;      LListenerThreads.Delete(0);&#xA;    end;&#xA;  finally&#xA;    FListenerThreads.UnlockList;&#xA;  end;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The listener thread also touches the same binding from its own thread:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;procedure TIdUDPListenerThread.AfterRun;&#xA;begin&#xA;  inherited AfterRun;&#xA;  FBinding.CloseSocket;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The listener stores the binding as a raw object reference:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;TIdUDPListenerThread = class(TIdThread)&#xA;protected&#xA;  FBinding: TIdSocketHandle;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;code&gt;TIdThread.Stop&lt;/code&gt; only sets the stopped/terminated state. It does not wait for the&#xA;thread to finish. &lt;code&gt;WaitFor&lt;/code&gt; is called only after &lt;code&gt;LListener.Binding.CloseSocket&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So the ownership model seems to be:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;TIdUDPServer.Bindings&lt;/code&gt; owns the &lt;code&gt;TIdSocketHandle&lt;/code&gt; objects.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;TIdUDPListenerThread&lt;/code&gt; stores a non-owning &lt;code&gt;FBinding&lt;/code&gt; reference to one of them.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;CloseBinding&lt;/code&gt; locks only the listener list, not the binding lifetime.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;TIdSocketHandle.CloseSocket&lt;/code&gt; locks the socket handle fields of a live object,&#xA;but it does not pin the lifetime of the &lt;code&gt;TIdSocketHandle&lt;/code&gt; object itself.&lt;/li&gt;&#xA;&lt;li&gt;The listener thread may still run &lt;code&gt;AfterRun&lt;/code&gt; and touch &lt;code&gt;FBinding&lt;/code&gt; while the&#xA;owner thread is already in &lt;code&gt;CloseBinding&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In an instrumented run I saw a listener that was created with a valid socket&#xA;handle, then during shutdown its &lt;code&gt;FBinding.Handle&lt;/code&gt; became a garbage value before&#xA;the AV:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;bind #0 handle=972&#xA;bind #1 handle=1084&#xA;listener #0 STARTED&#xA;listener #1 STARTED&#xA;CloseBinding -&amp;gt; listener #0&#xA;AfterRun: listener #0 closes handle=3145776&#xA;AV at LListener.Binding.CloseSocket&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This does not look like a harmless double &lt;code&gt;CloseSocket&lt;/code&gt; on the same live object.&#xA;If both threads reached the same live &lt;code&gt;TIdSocketHandle&lt;/code&gt;, &lt;code&gt;FConnectionHandle&lt;/code&gt;&#xA;inside &lt;code&gt;TIdSocketHandle.CloseSocket&lt;/code&gt; should serialize the close. The problem&#xA;appears to be that the listener&#x27;s &lt;code&gt;FBinding&lt;/code&gt; reference is no longer a coherent&#xA;live binding object by the time shutdown code uses it.&lt;/p&gt;&#xA;&lt;p&gt;Questions:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Is &lt;code&gt;TIdUDPServer.CloseBinding&lt;/code&gt; intended to be safe under rapid&#xA;&lt;code&gt;Active := False&lt;/code&gt; / &lt;code&gt;Active := True&lt;/code&gt; cycles?&lt;/li&gt;&#xA;&lt;li&gt;Is the ordering in &lt;code&gt;CloseBinding&lt;/code&gt; correct? In particular, should it call&#xA;&lt;code&gt;LListener.Binding.CloseSocket&lt;/code&gt; before &lt;code&gt;LListener.WaitFor&lt;/code&gt;, while the listener&#xA;thread can still execute &lt;code&gt;AfterRun&lt;/code&gt; and use &lt;code&gt;FBinding&lt;/code&gt;?&lt;/li&gt;&#xA;&lt;li&gt;Is there an official Indy workaround? For example:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;avoid auto-created dual IPv4/IPv6 bindings and explicitly create one binding;&lt;/li&gt;&#xA;&lt;li&gt;never clear/change &lt;code&gt;Bindings&lt;/code&gt; after activation;&lt;/li&gt;&#xA;&lt;li&gt;serialize &lt;code&gt;Active&lt;/code&gt; changes externally;&lt;/li&gt;&#xA;&lt;li&gt;patch &lt;code&gt;CloseBinding&lt;/code&gt; to stop/wake/wait in a different order.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h2&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I investigated this further, and I think the original suspicion about&#xA;&lt;code&gt;TIdUDPServer.CloseBinding()&lt;/code&gt; was probably wrong.&lt;/p&gt;&#xA;&lt;p&gt;The real issue in my code is most likely that I call &lt;code&gt;TIdUDPServer.SendBuffer()&lt;/code&gt;&#xA;from one thread while another thread controls the server lifecycle&#xA;(&lt;code&gt;Active := False/True&lt;/code&gt;, reconnect/shutdown).&lt;/p&gt;&#xA;&lt;p&gt;In my application the UDP reader path can send packets, and the owner/runtime&#xA;thread can also send packets and recreate the UDP server. I could not find a&#xA;clear statement that all &lt;code&gt;TIdUDPServer&lt;/code&gt; access has to be serialized by the&#xA;application, or that &lt;code&gt;SendBuffer()&lt;/code&gt; must not race with &lt;code&gt;Active&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This small repro shows the part that surprised me:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;program IndyUdpAvMvp;&#xA;&#xA;{$APPTYPE CONSOLE}&#xA;&#xA;uses&#xA;  System.SysUtils,&#xA;  System.Classes,&#xA;  Winapi.Windows,&#xA;  IdGlobal,&#xA;  IdSocketHandle,&#xA;  IdUDPServer;&#xA;&#xA;type&#xA;  TEvents = class&#xA;    procedure UDPException(AThread: TIdUDPListenerThread; ABinding: TIdSocketHandle;&#xA;      const AMessage: string; const AExceptionClass: TClass);&#xA;  end;&#xA;&#xA;  TSender = class(TThread)&#xA;  protected&#xA;    procedure Execute; override;&#xA;  end;&#xA;&#xA;var&#xA;  S: TIdUDPServer;&#xA;  Events: TEvents;&#xA;&#xA;procedure TEvents.UDPException(AThread: TIdUDPListenerThread; ABinding: TIdSocketHandle;&#xA;  const AMessage: string; const AExceptionClass: TClass);&#xA;begin&#xA;  Writeln(&#x27;OnUDPException: &#x27;, AExceptionClass.ClassName, &#x27;: &#x27;, AMessage);&#xA;end;&#xA;&#xA;procedure TSender.Execute;&#xA;var&#xA;  B: TIdBytes;&#xA;begin&#xA;  SetLength(B, 1);&#xA;  Sleep(50);&#xA;  If not Terminated then&#xA;    S.SendBuffer(&#x27;127.0.0.1&#x27;, 54000, Id_IPv4, B);&#xA;end;&#xA;&#xA;var&#xA;  T: TSender;&#xA;&#xA;begin&#xA;  Events := TEvents.Create;&#xA;  S := TIdUDPServer.Create(nil);&#xA;  try&#xA;    S.DefaultPort := 54000;&#xA;    S.OnUDPException := Events.UDPException;&#xA;    S.Active := true;&#xA;    T := TSender.Create(false);&#xA;    try&#xA;      S.Active := false;&#xA;      T.WaitFor;&#xA;    finally&#xA;      T.Free;&#xA;    end;&#xA;    S.Bindings.ClearAndResetID;&#xA;    S.Binding.CloseSocket;&#xA;  finally&#xA;    S.Free;&#xA;    Events.Free;&#xA;  end;&#xA;end.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;On my machine this raises:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;Exception EAccessViolation in module IndyUdpAvMvp.exe ...&#xA;Read of address 0000000000000000&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;code&gt;OnUDPException&lt;/code&gt; is not called.&lt;/p&gt;&#xA;&lt;p&gt;My current understanding is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;TIdUDPServer.SendBuffer()&lt;/code&gt; is not just a passive send operation. It goes&#xA;through &lt;code&gt;Binding&lt;/code&gt;, and for &lt;code&gt;TIdUDPServer&lt;/code&gt; accessing &lt;code&gt;Binding&lt;/code&gt; may allocate and&#xA;bind sockets and start listener threads.&lt;/li&gt;&#xA;&lt;li&gt;Therefore, calling &lt;code&gt;SendBuffer()&lt;/code&gt; after or during &lt;code&gt;Active := False&lt;/code&gt; can&#xA;effectively activate the server again.&lt;/li&gt;&#xA;&lt;li&gt;So the correct fix on my side is to serialize &lt;code&gt;SendBuffer()&lt;/code&gt; with server&#xA;lifecycle changes, or avoid base &lt;code&gt;TIdUDPServer.SendBuffer()&lt;/code&gt; in late-send paths&#xA;and send only through an already-existing live binding.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Is this interpretation correct? In other words, should &lt;code&gt;TIdUDPServer.SendBuffer()&lt;/code&gt;&#xA;be treated as lifecycle-affecting and not safe to race with &lt;code&gt;Active&lt;/code&gt; changes?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79943994</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">How to load Excel date cell</title>
            <category scheme="https://stackoverflow.com/tags" term="excel" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
        <author>
            <name>Carlos Matos</name>
            <uri>https://stackoverflow.com/users/8343727</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79943994/how-to-load-excel-date-cell" />
        <published>2026-05-20T11:06:41Z</published>
        <updated>2026-05-22T11:38:39Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x27;m using OfficeXML4D library for Delphi and when I do something like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Sheet.Cell[&#x27;F2&#x27;].AsDateTime := Now;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;What happens is that the date will show 2096-05-20, instead of 2026-05-20.&lt;/p&gt;&#xA;&lt;p&gt;I checked .AsDateTime, which is:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;procedure TExcelCell.SetAsDateTime(const Value: TDateTime);&#xA;begin&#xA;  FDateTimeValue := Value;&#xA;  FFloatValue := Value &#x2B; ExcelDateOffset;&#xA;  FCellType := TCellType.DateTime;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So, the problem seems to be in:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;FFloatValue := Value &#x2B; ExcelDateOffset;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If I remove ExcelDateOffset, the date will be loaded just fine. Can anyone explain why this is like this and if it is ok to remove that from the code?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79939461</id>
        <re:rank scheme="https://stackoverflow.com">2</re:rank>
        <title type="text">How to notify a (Spring4D) TObjectDataSet when a bound object property has changed</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="dbgrid" />
            <category scheme="https://stackoverflow.com/tags" term="tdbgrid" />
            <category scheme="https://stackoverflow.com/tags" term="spring4d" />
            <category scheme="https://stackoverflow.com/tags" term="tdataset" />
        <author>
            <name>Richard Shuck</name>
            <uri>https://stackoverflow.com/users/12215803</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79939461/how-to-notify-a-spring4d-tobjectdataset-when-a-bound-object-property-has-chang" />
        <published>2026-05-11T15:42:18Z</published>
        <updated>2026-05-12T10:27:23Z</updated>
        <summary type="html">
            &lt;p&gt;The value shown in an attached grid is updated when using&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;  ObjectDataSet.FieldByName(&#x27;Description&#x27;).AsString:=&#x27;Bob&#x27;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;But not when calling&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;  ObjectDataSet.GetCurrentModel&amp;lt;TSaleLine&amp;gt;.Description:=&#x27;Bob&#x27;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This is understandable as the TObjectDataSet is not monitoring the object properties and therefore unaware of the change.&lt;/p&gt;&#xA;&lt;p&gt;I want to add onpropertychanged support to TObjectDataSet to monitor changes to the current model which will then in turn fire a DataEvent(deFieldChange,&amp;lt;field&amp;gt;) as the field change does but am unable to figure out how to trigger it.&lt;/p&gt;&#xA;&lt;p&gt;I have tried the following but no dice.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;type&#xA;  TL = class(TGridDataLink);&#xA;&#xA;begin&#xA;  ObjectDataSet.GetCurrentModel&amp;lt;TSaleLine&amp;gt;.Description:=&#x27;Bob&#x27;;&#xA;&#xA;  var G:=TGridDataLink.Create(Grid);&#xA;  TL(G).RecordChanged(ObjectDataSet.FieldByName(&#x27;Description&#x27;));&#xA;  G.Free;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79939382</id>
        <re:rank scheme="https://stackoverflow.com">3</re:rank>
        <title type="text">How get screenshot of offscreen window?</title>
            <category scheme="https://stackoverflow.com/tags" term="windows" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="screenshot" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-10.4-sydney" />
        <author>
            <name>JOTA</name>
            <uri>https://stackoverflow.com/users/22401964</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79939382/how-get-screenshot-of-offscreen-window" />
        <published>2026-05-11T13:19:18Z</published>
        <updated>2026-05-13T19:14:55Z</updated>
        <summary type="html">
            &lt;p&gt;How to get a continuous screenshot of a window that is not visible on the screen (offscreen)?&lt;/p&gt;&#xA;&lt;p&gt;I have the following code that initially seemed to work, but this got only the first frame (when the target window is updated, the screenshot still is the first frame). Are there other approaches to achieve this?&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;unit Unit1;&#xA;&#xA;interface&#xA;&#xA;uses&#xA;  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,&#xA;  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls;&#xA;&#xA;type&#xA;  TForm1 = class(TForm)&#xA;    Timer1: TTimer;&#xA;    procedure Timer1Timer(Sender: TObject);&#xA;  end;&#xA;&#xA;var&#xA;  Form1: TForm1;&#xA;&#xA;implementation&#xA;&#xA;{$R *.dfm}&#xA;&#xA;function ActiveCaption: string;&#xA;var&#xA;  Handle: THandle;&#xA;  Len: LongInt;&#xA;  Title: string;&#xA;begin&#xA;  Result := &#x27;&#x27;;&#xA;  Handle := GetForegroundWindow;&#xA;  if Handle &amp;lt;&amp;gt; 0 then&#xA;  begin&#xA;    Len := GetWindowTextLength(Handle) &#x2B; 1;&#xA;    SetLength(Title, Len);&#xA;    GetWindowText(Handle, PChar(Title), Len);&#xA;    ActiveCaption := TrimRight(Title);&#xA;  end;&#xA;end;&#xA;&#xA;procedure ScreenShotWindow;&#xA;var&#xA;  DC: HDC;&#xA;  wRect: TRect;&#xA;  Bmp: TBitmap;&#xA;  Width, Height: Integer;&#xA;  H: HWnd;&#xA;  title: array[0..MAX_PATH]of char;&#xA;begin&#xA;  H := FindWindow(nil, PWideChar(ActiveCaption));  &#xA;  if H = 0 then&#xA;    Exit;&#xA;&#xA;  DC := GetWindowDC(H);&#xA;  try&#xA;    Bmp := TBitmap.Create;&#xA;    try&#xA;      GetWindowRect(H, wRect);&#xA;      Width := wRect.Right - wRect.Left;&#xA;      Height := wRect.Bottom - wRect.Top;&#xA;      Bmp.SetSize(Width, Height);&#xA;      BitBlt(Bmp.Canvas.Handle, 0, 0, Width, Height, DC, 0, 0, SRCCOPY);&#xA;      Form1.Canvas.Draw(0, 0, Bmp);&#xA;    finally&#xA;      Bmp.Free;&#xA;    end;&#xA;  finally&#xA;    ReleaseDC(H, DC);&#xA;  end;&#xA;end;&#xA;&#xA;procedure TForm1.Timer1Timer(Sender: TObject);&#xA;begin&#xA;   ScreenShotWindow;&#xA;end;&#xA;&#xA;end.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I still have hope that it is possible, otherwise, I understood that it is &lt;a href=&quot;https://stackoverflow.com/questions/4176340/how-to-take-a-screenshot-of-a-full-size-window-in-c-sharp/4176486#comment4645722_4176486&quot;&gt;a system limitation&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.sstatic.net/gw1a9mHI.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.sstatic.net/gw1a9mHI.png&quot; alt=&quot;quoting Remy: &amp;quot;If it&#x27;s not on-screen, Windows doesn&#x27;t physically render it.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79936938</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">TWebBrowser.Silent = TRUE still shows &quot;bad certificate&quot; error</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-7" />
            <category scheme="https://stackoverflow.com/tags" term="twebbrowser" />
        <author>
            <name>H&#xE9;ctor C.</name>
            <uri>https://stackoverflow.com/users/4105601</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79936938/twebbrowser-silent-true-still-shows-bad-certificate-error" />
        <published>2026-05-06T10:46:28Z</published>
        <updated>2026-05-06T11:39:17Z</updated>
        <summary type="html">
            &lt;p&gt;I have a &lt;code&gt;TWebBrowser&lt;/code&gt; with the &lt;code&gt;.Silent&lt;/code&gt; property set to &lt;code&gt;True&lt;/code&gt;, but it&#x27;s still popping up the message&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Revocation information for the security certificate for this site is not available. Do you want to proceed?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code&gt;unit browsertest;&#xA;&#xA;interface&#xA;&#xA;uses&#xA;  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,&#xA;  Dialogs, StdCtrls, OleCtrls, SHDocVw;&#xA;&#xA;type&#xA;  TForm1 = class(TForm)&#xA;    WebBrowser1: TWebBrowser;&#xA;    Button1: TButton;&#xA;    procedure Button1Click(Sender: TObject);&#xA;  private&#xA;    { Private declarations }&#xA;  public&#xA;    { Public declarations }&#xA;  end;&#xA;&#xA;var&#xA;  Form1: TForm1;&#xA;&#xA;implementation&#xA;&#xA;{$R *.dfm}&#xA;&#xA;procedure TForm1.Button1Click(Sender: TObject);&#xA;begin&#xA;  self.WebBrowser1.Silent := True;&#xA;  self.WebBrowser1.Navigate(&#x27;http://...&#x27;);&#xA;end;&#xA;&#xA;end.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.sstatic.net/mB4GAQDs.png&quot; alt=&quot;Internet Explorer&#x27;s certificate error dialog window&quot; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;How can I solve this so the popup doesn&#x27;t appear? It must be done programatically, so editing Internet Preferences is out of question (as this is distributed to thousands of clients).&lt;/p&gt;&#xA;&lt;p&gt;This message appears on some computers, but not in all of them.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79932029</id>
        <re:rank scheme="https://stackoverflow.com">2</re:rank>
        <title type="text">Delphi &#x2B; PAServer: How to correctly export iOS app with Notification Service Extension (appex) &#x2013; missing provisioningProfiles in exportOptions.plist</title>
            <category scheme="https://stackoverflow.com/tags" term="ios" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="firemonkey" />
        <author>
            <name>zeus</name>
            <uri>https://stackoverflow.com/users/1114043</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79932029/delphi-paserver-how-to-correctly-export-ios-app-with-notification-service-ext" />
        <published>2026-04-26T11:32:32Z</published>
        <updated>2026-04-30T07:51:42Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x2019;m deploying an iOS app built with Delphi (FMX) using PAServer. The app includes a Notification Service Extension (&lt;code&gt;.appex&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;The build succeeds, but the export step fails with:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;error: exportArchive &amp;quot;NotificationService.appex&amp;quot; requires a provisioning profile.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Context&lt;/h3&gt;&#xA;&lt;p&gt;App structure:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;MyApp.app/&#xA;  PlugIns/&#xA;    NotificationService.appex/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Bundle identifiers:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Main app: &lt;code&gt;com.example.myapp&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Extension: &lt;code&gt;com.example.myapp.notificationservice&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Both App Store provisioning profiles exist and are valid.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Problem&lt;/h3&gt;&#xA;&lt;p&gt;PAServer generates this &lt;code&gt;exportOptions.plist&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-xml prettyprint-override&quot;&gt;&lt;code&gt;&amp;lt;key&amp;gt;provisioningProfiles&amp;lt;/key&amp;gt;&#xA;&amp;lt;dict&amp;gt;&#xA;  &amp;lt;key&amp;gt;com.example.myapp&amp;lt;/key&amp;gt;&#xA;  &amp;lt;string&amp;gt;com.example.myapp&amp;lt;/string&amp;gt;&#xA;&amp;lt;/dict&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;But the extension is missing. It should be:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-xml prettyprint-override&quot;&gt;&lt;code&gt;&amp;lt;key&amp;gt;provisioningProfiles&amp;lt;/key&amp;gt;&#xA;&amp;lt;dict&amp;gt;&#xA;  &amp;lt;key&amp;gt;com.example.myapp&amp;lt;/key&amp;gt;&#xA;  &amp;lt;string&amp;gt;com.example.myapp&amp;lt;/string&amp;gt;&#xA;  &amp;lt;key&amp;gt;com.example.myapp.notificationservice&amp;lt;/key&amp;gt;&#xA;  &amp;lt;string&amp;gt;com.example.myapp.notificationservice&amp;lt;/string&amp;gt;&#xA;&amp;lt;/dict&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Without this, &lt;code&gt;xcodebuild -exportArchive&lt;/code&gt; fails.&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;h3&gt;Question&lt;/h3&gt;&#xA;&lt;p&gt;Is there a way to make Delphi / PAServer include app extensions in &lt;code&gt;exportOptions.plist&lt;/code&gt;?&lt;/p&gt;&#xA;&lt;p&gt;Or is manually exporting with &lt;code&gt;xcodebuild&lt;/code&gt; the only solution when using &lt;code&gt;.appex&lt;/code&gt; extensions?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79930592</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">Generic TForm in hiearchy</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="firemonkey" />
        <author>
            <name>David U</name>
            <uri>https://stackoverflow.com/users/1110927</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79930592/generic-tform-in-hiearchy" />
        <published>2026-04-23T08:44:33Z</published>
        <updated>2026-04-24T07:35:18Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x27;m building a fmx app in Delphi 12.2.&lt;/p&gt;&#xA;&lt;p&gt;I would like to create a view hierarchy  that includes a 3rd party generic TForm descendent. This 3rd party TForm does not have an fmx file. It does not appear in the list of inheritable items when I create a new fmx TForm.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;TForm&#xA;T3rdPartyForm&amp;lt;T&amp;gt; = class(TForm) (no fmx file)&#xA;TViewBase&amp;lt;T&amp;gt; = class(T3rdPartyForm&amp;lt;T&amp;gt;)&#xA;TAppView1 = class(TViewBase&amp;lt;TAClass&amp;gt;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I have created the hierarchy. It compiles and runs. &lt;code&gt;TAppView1&lt;/code&gt; has an &lt;code&gt;.fmx&lt;/code&gt; file that I can edit in the IDE and which appears correctly at run time.&lt;/p&gt;&#xA;&lt;p&gt;But, every time I start Delphi, I get 2 error messages:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Error creating form in View.Base.fmx: Error in module: Declaration of call TViewBase is missing or incorrect.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Error in module: Declaration of call TViewBase is missing or incorrect.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I also get the second message when I click the Design tab of &lt;code&gt;TViewBase&amp;lt;T&amp;gt;&lt;/code&gt;. I don&#x27;t know if the error is because &lt;code&gt;T3rdPartyForm&amp;lt;T&amp;gt;&lt;/code&gt; is generic or because it has no &lt;code&gt;.fmx&lt;/code&gt; file.&lt;/p&gt;&#xA;&lt;p&gt;I would like to be able to edit &lt;code&gt;TViewBase&amp;lt;T&amp;gt;&lt;/code&gt; in the IDE design editor so that its components, as well as its code, can be inherited. I would also like for code completion to work completely and correctly for all forms at the level of &lt;code&gt;TAppView1&lt;/code&gt;, and to reduce the number of fake LSP errors I see when editing &lt;code&gt;TAppView1&lt;/code&gt; and its siblings. I think that all of this is impacted by the errors I am seeing.&lt;/p&gt;&#xA;&lt;p&gt;How do I get the hierarchy I want without errors?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79926312</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">How to load a Delphi TService driver early?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="service" />
            <category scheme="https://stackoverflow.com/tags" term="driver" />
            <category scheme="https://stackoverflow.com/tags" term="startup" />
        <author>
            <name>WayOfTheWright</name>
            <uri>https://stackoverflow.com/users/12980952</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79926312/how-to-load-a-delphi-tservice-driver-early" />
        <published>2026-04-15T22:53:18Z</published>
        <updated>2026-04-20T04:02:17Z</updated>
        <summary type="html">
            &lt;p&gt;I am wondering what the best approach is to writing a Delphi service (using the &lt;code&gt;TService&lt;/code&gt; class) to load my basic driver that simply writes a message to a file on disk. No network access is needed, or anything advanced.&lt;/p&gt;&#xA;&lt;p&gt;I am unsure of the &lt;code&gt;StartType&lt;/code&gt; setting and &lt;code&gt;LoadGroup&lt;/code&gt; name I need to use. AI keeps suggesting a load group of &amp;quot;System Reserved&amp;quot; from a quick search, but I want better real-world advice from developers that have implemented Delphi &lt;code&gt;TService&lt;/code&gt; apps that use early loading for executing a driver load.&lt;/p&gt;&#xA;&lt;p&gt;I use &lt;code&gt;ZwLoadDriver&lt;/code&gt; directly, in case this matters, as I don&#x27;t use the Service Control Manager that is built-in to Windows.&lt;/p&gt;&#xA;&lt;p&gt;Any suggestions for loading a very basic &amp;quot;Hello world!&amp;quot; driver from an early-started service?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79926191</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">Delphi, hooking TBitmap.Create &amp; stack trace</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="hook" />
            <category scheme="https://stackoverflow.com/tags" term="stack-trace" />
        <author>
            <name>Mark</name>
            <uri>https://stackoverflow.com/users/2976664</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79926191/delphi-hooking-tbitmap-create-stack-trace" />
        <published>2026-04-15T17:43:09Z</published>
        <updated>2026-04-16T16:16:18Z</updated>
        <summary type="html">
            &lt;p&gt;Posting this because I could not find an answer and code produced by two AIs I queried, would not compile. And when I did get it to compile it crashed at some point.&lt;/p&gt;&#xA;&lt;p&gt;I needed to hook TBitmap.Create and log the calling function/procedure name. I did not parse the stack dump from madExcept&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;http://www.madexcept.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;madExcept&lt;/a&gt; and &lt;a href=&quot;https://github.com/MahdiSafsafi/DDetours&quot; rel=&quot;nofollow noreferrer&quot;&gt;DDetours&lt;/a&gt; is required.&lt;/p&gt;&#xA;&lt;p&gt;I am using Delphi 10.2&lt;/p&gt;&#xA;&lt;p&gt;Here is code to hook the constructor:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;unit Main;&#xA;&#xA;interface&#xA;&#xA;uses&#xA;  Winapi.Windows,Winapi.Messages,System.SysUtils,System.Variants,System.Classes,Vcl.Graphics,Vcl.Controls,Vcl.Forms,Vcl.Dialogs,DDetours,Vcl.StdCtrls;&#xA;&#xA;type&#xA;  TForm2 = class(TForm)&#xA;    CreateBitmapBtn: TButton;&#xA;    RemoveHookBtn: TButton;&#xA;    procedure CreateBitmapBtnClick(Sender: TObject);&#xA;    procedure RemoveHookBtnClick(Sender: TObject);&#xA;  private&#xA;    { Private declarations }&#xA;  public&#xA;    { Public declarations }&#xA;  end;&#xA;&#xA;var&#xA;  Form2: TForm2;&#xA;&#xA;procedure InstallTBitmapCreateHook;&#xA;procedure RemoveTBitmapCreateHook;&#xA;&#xA;implementation&#xA;&#xA;{$R *.dfm}&#xA;&#xA;uses madStackTrace;&#xA;&#xA;type&#xA; TBitmapCreateFunc = function(self:TBitmap; DoAlloc:Boolean): TBitmap;&#xA;&#xA;var&#xA; TBitmap_Create_Hook:TBitmapCreateFunc = nil;&#xA;&#xA;function Hook_TBitmap_Create(self:TBitmap; DoAlloc:Boolean):TBitmap;&#xA;var&#xA; CallerName: string;&#xA;begin&#xA; CallerName:=StackTrace;                        // Get call stack via madExcept&#xA; ShowMessage(CallerName);&#xA; result:=TBitmap_Create_Hook(self,DoAlloc);     // Call original constructor&#xA;end;&#xA;&#xA;procedure TForm2.CreateBitmapBtnClick(Sender: TObject);&#xA;var&#xA; bMap:TBitMap;&#xA;begin&#xA; bMap:=TBitMap.Create;&#xA; bMap.Free;&#xA;end;&#xA;&#xA;procedure InstallTBitmapCreateHook;&#xA;begin&#xA; TBitmap_Create_Hook:=InterceptCreate(@Vcl.Graphics.TBitmap.Create, @Hook_TBitmap_Create);&#xA;end;&#xA;&#xA;procedure RemoveTBitmapCreateHook;&#xA;begin&#xA; try&#xA;  InterceptRemove(@TBitmap_Create_Hook);&#xA; finally&#xA;  TBitmap_Create_Hook:=nil;&#xA; end;&#xA;end;&#xA;&#xA;procedure TForm2.RemoveHookBtnClick(Sender: TObject);&#xA;begin&#xA; RemoveTBitmapCreateHook;&#xA;end;&#xA;&#xA;initialization&#xA; InstallTBitmapCreateHook;&#xA;&#xA;finalization&#xA; RemoveTBitmapCreateHook;&#xA;&#xA;end.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And here is code to hook &lt;code&gt;AfterConstruction()&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;unit Main2;&#xA;&#xA;interface&#xA;&#xA;uses&#xA;  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,&#xA;  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls,DDetours;&#xA;&#xA;type&#xA;  TForm3 = class(TForm)&#xA;    CreateBitmapBtn: TButton;&#xA;    RemoveHookBtn: TButton;&#xA;    Memo1: TMemo;&#xA;    procedure CreateBitmapBtnClick(Sender: TObject);&#xA;    procedure RemoveHookBtnClick(Sender: TObject);&#xA;  private&#xA;    { Private declarations }&#xA;  public&#xA;    { Public declarations }&#xA;  end;&#xA;&#xA;var&#xA;  Form3: TForm3;&#xA;&#xA;implementation&#xA;&#xA;{$R *.dfm}&#xA;&#xA;uses madStackTrace;&#xA;&#xA;type&#xA; TAfterConstructionProc = procedure(Self: TBitmap);&#xA;&#xA;var&#xA; Trampoline_TBitmap_AfterConstruction: TAfterConstructionProc = nil;&#xA;&#xA;procedure Intercept_TBitmap_AfterConstruction(Self: TBitmap);&#xA;var&#xA; CallerName: string;&#xA;begin&#xA; CallerName:=StackTrace;                        // Get call stack via madExcept&#xA; if Assigned(Form3) and Assigned(Form3.Memo1) then&#xA;  Form3.Memo1.Lines.Add(CallerName);&#xA;&#xA; if Assigned(Trampoline_TBitmap_AfterConstruction) then&#xA;  Trampoline_TBitmap_AfterConstruction(Self);&#xA;end;&#xA;&#xA;procedure InstallBitmapHook;&#xA;begin&#xA; if not Assigned(Trampoline_TBitmap_AfterConstruction) then&#xA;  begin&#xA;   @Trampoline_TBitmap_AfterConstruction:=InterceptCreate(@TBitmap.AfterConstruction,&#xA;                                                          @Intercept_TBitmap_AfterConstruction);&#xA;  end;&#xA;end;&#xA;&#xA;procedure RemoveBitmapHook;&#xA;begin&#xA; if Assigned(Trampoline_TBitmap_AfterConstruction) then&#xA;  begin&#xA;   InterceptRemove(@Trampoline_TBitmap_AfterConstruction);&#xA;   Trampoline_TBitmap_AfterConstruction:=nil;&#xA;  end;&#xA;end;&#xA;&#xA;procedure TForm3.CreateBitmapBtnClick(Sender: TObject);&#xA;var&#xA; bMap:TBitMap;&#xA;begin&#xA; bMap:=TBitMap.Create;&#xA; bMap.Free;&#xA;end;&#xA;&#xA;procedure TForm3.RemoveHookBtnClick(Sender: TObject);&#xA;begin&#xA; RemoveBitmapHook;&#xA;end;&#xA;&#xA;initialization&#xA; InstallBitmapHook;&#xA;&#xA;finalization&#xA; RemoveBitmapHook;&#xA;&#xA;end.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79922738</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">THTTPRio Authorization Bearer</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="bearer-token" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-10.2-tokyo" />
        <author>
            <name>Carlos Matos</name>
            <uri>https://stackoverflow.com/users/8343727</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79922738/thttprio-authorization-bearer" />
        <published>2026-04-09T10:27:20Z</published>
        <updated>2026-04-27T16:41:43Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x27;m using Delphi Tokio 10.2.3 and using a THTTPRIO component to consume a SOAP webservice.&lt;/p&gt;&#xA;&lt;p&gt;I need/must use Bearer token authentication on the request, because the service was changed from basic authentication (username/password) to bearer token.&lt;/p&gt;&#xA;&lt;p&gt;How can I set/add the token to the header request using THTTPRIO?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79921668</id>
        <re:rank scheme="https://stackoverflow.com">3</re:rank>
        <title type="text">How to implement a scoped context in Spring4D?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="spring4d" />
        <author>
            <name>Richard Shuck</name>
            <uri>https://stackoverflow.com/users/12215803</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79921668/how-to-implement-a-scoped-context-in-spring4d" />
        <published>2026-04-07T15:49:32Z</published>
        <updated>2026-04-08T10:31:57Z</updated>
        <summary type="html">
            &lt;p&gt;I want to be able to register a scoped singleton which would work like &lt;code&gt;TSingletonPerThreadLifetimeManager&lt;/code&gt; does, but is freed when it goes out of scope.&lt;/p&gt;&#xA;&lt;p&gt;I want to have the ability to treat certain objects as singletons within the context of a scope.&lt;/p&gt;&#xA;&lt;p&gt;In the example below, &lt;code&gt;Context&lt;/code&gt; is used by both &lt;code&gt;TTest&lt;/code&gt; and &lt;code&gt;TSub&lt;/code&gt;. I would want them to both point to the same instance, but be unaware that the other one is using it.&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;type&#xA;  TSub = class(TInterfacedObject, ISub)&#xA;  public&#xA;    constructor Create(Context: IContext);&#xA;  end;&#xA;&#xA;  TTest = class(TInterfacedObject, ITest)&#xA;  public&#xA;    constructor Create(Context: IContext; Sub: ISub);&#xA;  end;&#xA;&#xA;Container.RegisterType&amp;lt;IContext,TContext&amp;gt;.AsScoped;&#xA;Container.RegisterType&amp;lt;ITest,TTest&amp;gt;.AsTransient;&#xA;Container.RegisterType&amp;lt;ISub,TSub&amp;gt;.AsTransient;&#xA;&#xA;var Scope:=TScope.New;&#xA;try&#xA;  var test:=Container.Resolve&amp;lt;ITest&amp;gt;();&#xA;  test.execute;&#xA;finally&#xA;  Scope:=nil;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Ideally, I would not want to reference the container inside the scope, but process a passed in dynamic factory, such as:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;procedure DoInScope(TestFactory: Func&amp;lt;ITest&amp;gt;);&#xA;begin&#xA;  var Scope:=TScope.New;&#xA;  try&#xA;    TestFactory().Execute;&#xA;  finally&#xA;    Scope:=nil;&#xA;  end;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I had a look at &lt;code&gt;TSingletonPerThreadLifetimeManager&lt;/code&gt;, but was unable to figure out how to trigger the references to be freed at the end of scope.&lt;/p&gt;&#xA;&lt;p&gt;Another option I can think of is to use a delegate, such as:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;Container.RegisterType&amp;lt;IContext,TContext&amp;gt;.DelegateTo(&#xA;  function: IContext&#xA;  begin&#xA;    if TScope.InScope then&#xA;    begin&#xA;      if not TScope.Has&amp;lt;IContext&amp;gt; then&#xA;        TScope.Add&amp;lt;IContext&amp;gt;(Container.Resolve&amp;lt;IContext&amp;gt;); // wont work as recursive&#xA;      Result:=TScope.Get&amp;lt;IContext&amp;gt;;&#xA;    end;&#xA;  end&#xA;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79918244</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">Bad DFM streaming of a TForm displayed in CEF4Delphi TChromium.OnDownloadUpdated event</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-7" />
            <category scheme="https://stackoverflow.com/tags" term="chromium-embedded" />
            <category scheme="https://stackoverflow.com/tags" term="cef4delphi" />
        <author>
            <name>H&#xE9;ctor C.</name>
            <uri>https://stackoverflow.com/users/4105601</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79918244/bad-dfm-streaming-of-a-tform-displayed-in-cef4delphi-tchromium-ondownloadupdated" />
        <published>2026-04-01T08:57:50Z</published>
        <updated>2026-04-04T18:26:05Z</updated>
        <summary type="html">
            &lt;p&gt;I have a project using CEF4Delphi that uses a custom Open/Save dialog when downloading a file.&lt;/p&gt;&#xA;&lt;p&gt;This is the event when I create the custom form&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;procedure TMainForm.ChromiumDownloadUpdated(Sender: TObject;&#xA;  const browser: ICefBrowser; const downloadItem: ICefDownloadItem;&#xA;  const callback: ICefDownloadItemCallback);&#xA;&#xA;var&#xA;  FileIcon: TIcon;&#xA;  Descripcion: string;&#xA;  originalFilename: string;&#xA;  openSaveForm: TOpenSaveForm;&#xA;begin&#xA;  else if downloadItem.IsComplete then&#xA;  begin&#xA;    FileIcon := TIcon.Create;&#xA;    openSaveForm := TOpenSaveForm.Create(Self);&#xA;    try&#xA;      try&#xA;        openSaveForm.LabelFilename.Caption := OpenSaveFormCaptionMsg(originalFilename, downloadItem.ReceivedBytes);&#xA;        GetFileIconAndDescription(downloadItem.GetFullPath, FileIcon, Descripcion);&#xA;        openSaveForm.RadioButtonOpen.Caption := openSaveForm.RadioButtonOpen.Caption &#x2B; &#x27; &#x27; &#x2B; Descripcion;&#xA;        openSaveForm.FileIcon.Picture.Icon := FileIcon;&#xA;        if openSaveForm.ShowModal = mrOk then&#xA;          ChooseShowSaveDialog(downloadItem.GetFullPath, openSaveForm.RadioButtonSave.Checked);&#xA;      except&#xA;        on E: Exception do&#xA;          ShowMessage(&#x27;Excepcion opensaveform: &#x27; &#x2B; E.Message);&#xA;      end;&#xA;    finally&#xA;      openSaveForm.Free;&#xA;      FileIcon.Free;&#xA;    end;&#xA;  end;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This form normally appears like this:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.sstatic.net/Fy6UqFTV.png&quot; alt=&quot;Correct form&quot; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;But somethimes the DFM streaming fails and the form appears broken:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.sstatic.net/GP2y23iQ.png&quot; alt=&quot;Broken form&quot; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;If I inspect the properties of the buttons, labels, etc they have Width=0, Left=0, etc, just after being created and before calling OnShow.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79917574</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">Migrating Delphi application to .NET: Framework 4.8 vs .NET 6&#x2B; for COM/Hydra interop</title>
            <category scheme="https://stackoverflow.com/tags" term=".net" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="remobjects" />
        <author>
            <name>sumeet</name>
            <uri>https://stackoverflow.com/users/2243211</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79917574/migrating-delphi-application-to-net-framework-4-8-vs-net-6-for-com-hydra-int" />
        <published>2026-03-31T06:39:21Z</published>
        <updated>2026-04-02T09:53:52Z</updated>
        <summary type="html">
            &lt;p&gt;We&#x27;re planning a phased migration of a large Delphi application to C#/.NET. The migration strategy involves:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;Running Delphi and C# side-by-side during transition (12-24 months)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Using &lt;strong&gt;RemObjects Hydra&lt;/strong&gt; (or COM interop) for Delphi &#x2194; C# communication&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Gradually replacing Delphi modules with C# equivalents&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;strong&gt;Our dilemma:&lt;/strong&gt; Should we target &lt;strong&gt;.NET Framework 4.8&lt;/strong&gt; initially or go directly to &lt;strong&gt;modern .NET (6/8/10)&lt;/strong&gt;?&lt;/p&gt;&#xA;&lt;h3&gt;Option A: .NET Framework 4.8 &#x2192; Later upgrade&lt;/h3&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Well-documented Delphi interop patterns&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Proven Hydra support&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Lower risk during pilot phase&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Requires migration to modern .NET later&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Creates temporary technical debt&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Double deployment/testing effort&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Option B: Modern .NET (6/8/10) directly&lt;/h3&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;No framework upgrade needed later&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Future-proof from day one&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Single migration path&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Less documented interop scenarios&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Potential runtime hosting issues with Delphi&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Unknown deployment complexities&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3&gt;Specific Technical Questions:&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Has anyone successfully used RemObjects Hydra or COM interop between Delphi and .NET 6&#x2B;?&lt;/strong&gt; What issues did you encounter?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;Are there known blockers for Delphi &#x2194; modern .NET interop&lt;/strong&gt; that would force us to use .NET Framework 4.8?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;&lt;strong&gt;What are the key technical differences&lt;/strong&gt; in hosting/interop between .NET Framework 4.8 and .NET 6&#x2B; that would affect a Delphi bridge?&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3&gt;Environment:&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;Delphi version: 13&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Windows desktop application&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Enterprise deployment&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;Gradual module-by-module replacement strategy&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79915872</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">Highlight cells in TCalendar</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="vcl" />
        <author>
            <name>Moore</name>
            <uri>https://stackoverflow.com/users/1584640</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79915872/highlight-cells-in-tcalendar" />
        <published>2026-03-27T16:31:08Z</published>
        <updated>2026-03-29T11:21:45Z</updated>
        <summary type="html">
            &lt;p&gt;Is there any way to highlight various non-contiguous cells in Delphi&#x27;s &lt;code&gt;TCalendar&lt;/code&gt; component at the same time? And not only the actual day?&lt;/p&gt;&#xA;&lt;p&gt;I need to let the user mark different days in different cells, not necessarily contiguous. Either the text or the background, or both, with a different color than the color of non-marked cells.&lt;/p&gt;&#xA;&lt;p&gt;I am using Delphi 12.3.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79914202</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">How to convert Delphi *.pas &quot;format ANSI&quot; files to *.pas &quot;format UTF&quot; files? (We are starting to use Cursor IDE on Delphi projects)</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="utf-8" />
            <category scheme="https://stackoverflow.com/tags" term="artificial-intelligence" />
            <category scheme="https://stackoverflow.com/tags" term="ansi" />
        <author>
            <name>TomR</name>
            <uri>https://stackoverflow.com/users/1375882</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79914202/how-to-convert-delphi-pas-format-ansi-files-to-pas-format-utf-files-we" />
        <published>2026-03-25T11:26:22Z</published>
        <updated>2026-06-05T10:01:42Z</updated>
        <summary type="html">
            &lt;p&gt;We have developed Delphi projects in Lithuanian (Baltic) local Windows machines and our Delphi *.pas files have been in &amp;quot;format ANSI&amp;quot; and they, of course, contained Lithuanian constants as well.&lt;/p&gt;&#xA;&lt;p&gt;Now we are starting to use Cursor IDE (&#x2B; the best models, like Claude Opus 4.6 Max or any other top model) to make AI developement on the codebase, but Cursor IDE &#x2B; models are totally incapable to handle ANSI Lithuanian files. Cursor &#x2B; models get confused and overwrites and overwrites Lithuanian texts and complete mess is the sole result. The opening of *.pas files with relevant encoding in Cursor IDE is not helping. The prompts are not helping either - models become unmanageable with this respect.&lt;/p&gt;&#xA;&lt;p&gt;So - I start the pratice to convert *.pas file from ANSI to UTF8 format - Delphi editor offers command &amp;quot;Right click - File Format...&amp;quot; and there is menu to change the format. This conversion worked as far as AI is concerted - the Cursor IDE &#x2B; models are able to program such files perfectly.&lt;/p&gt;&#xA;&lt;p&gt;But if the UTF8 format *.pas files contains string constants with Lithuanian values and those constants are used in the legacy ANSI format *.pas file code, then Strings in both files are incompatible. Even worse, IBX components, that wrote those Lithuanina values into UTF-8 Firebird database perfectly, now are writing complete mess.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;So - there is no other option, than to convert and retest all the *.pas files into UTF8 format. But how to do that conversion? Only working way is to do that manually from the Delphi IDE. I have not find any other way. Delphi IDE definition of ANSI/UTF8 file formats are somehow strange, because - if Cursor IDE is asked to detected them, then it decides that there are no BOMs etc. and gets confused. So - how to handle this conversion?&lt;/strong&gt;&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79911832</id>
        <re:rank scheme="https://stackoverflow.com">3</re:rank>
        <title type="text">How to change the background color of a TButton component with code in Delphi FMX?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="firemonkey" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-13-florence" />
            <category scheme="https://stackoverflow.com/tags" term="tbutton" />
        <author>
            <name>user31362432</name>
            <uri>https://stackoverflow.com/users/31362432</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79911832/how-to-change-the-background-color-of-a-tbutton-component-with-code-in-delphi-fm" />
        <published>2026-03-21T10:54:48Z</published>
        <updated>2026-06-05T09:40:33Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x27;ve been tasked to dynamically style buttons to be different colors with Delphi code in FMX&lt;/p&gt;&#xA;&lt;p&gt;I want a red &lt;code&gt;TButton&lt;/code&gt; component. My first thought was to use a &lt;code&gt;TRectangle&lt;/code&gt; instead of a &lt;code&gt;TButton&lt;/code&gt;, but then my boss said that he doesn&#x27;t want the components to be changed to something else because we have too many &lt;code&gt;TButton&lt;/code&gt; components already and I should find a way to make it work with &lt;code&gt;TButton&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;We get the colors from the database and now I need to fill the button with those colors. A coworker suggested I try something like this and he sent this code:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;begin&#xA;  var Obj := Button1.FindStyleResource(&#x27;background&#x27;);&#xA;&#xA;  if Obj is TRectangle then&#xA;    TRectangle(Obj).Fill.Color := TAlphaColorRec.Red;&#xA;end;&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That however didn&#x27;t work at all. He suggested some other similar exampled code that I tried and also didn&#x27;t work. I also tried going back and forth with AI and my coworker&#x27;s code, but nothing worked. My coworkers as well as AI seems convinced that this is possible, but I just can&#x27;t get it to work.&lt;/p&gt;&#xA;&lt;p&gt;I am open to any suggestions or methods as long as it the component stays a &lt;code&gt;TButton&lt;/code&gt; and as long as the color is changed via code during run-time.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79911685</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">delphi Data.DBXEncryption unit exception integer overflow</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="encryption" />
        <author>
            <name>CoryB</name>
            <uri>https://stackoverflow.com/users/22268375</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79911685/delphi-data-dbxencryption-unit-exception-integer-overflow" />
        <published>2026-03-21T01:26:53Z</published>
        <updated>2026-03-21T03:06:48Z</updated>
        <summary type="html">
            &lt;p&gt;Delphi 10.2.3&lt;br /&gt;&#xA;Windows 10 with all current updates&lt;/p&gt;&#xA;&lt;p&gt;I am suddenly getting this exception in Unit &lt;code&gt;Data.DBXEncryption&lt;/code&gt; &lt;code&gt;function TPC1Cypher.Code(const I: Integer): Integer;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overflow occurs in the line below in Delphi&#x27;s unit and function given above:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;if Ax &amp;lt;&amp;gt; 0 then  &#xA;   Ax := Ax * Bx;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The above code is directly from Delphi&#x27;s unit and function, unaltered.  I have not altered this code. The values for Ax and Bx are calculated within the function call itself.&lt;/p&gt;&#xA;&lt;p&gt;Because of this overflow username and password won&#x27;t validate where they had been.  Note: I had to reinstall some delphi 10.2.3 and TMS units after I mucked about in System.Classes (I know!) returning it to its original state.  I have not altered any other units (ie DBXEncryption, etc.)&lt;/p&gt;&#xA;&lt;p&gt;Any insight and help is appreciated!&#xA;This code below is directly copied from Delphi&#x27;s unit... It would be best if you have Delphi&#x27;s source code available to view this unit.  Thank you and good luck!&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;function TPC1Cypher.Code(const I: Integer): Integer;&#xA;    var&#xA;      Dx: Integer;&#xA;      Ax: Integer;&#xA;      Cx: Integer;&#xA;      Bx: Integer;&#xA;      Tmp: Integer;&#xA;    begin&#xA;      Dx := FX1a2 &#x2B; I;&#xA;      Ax := FX1a0[I];&#xA;      Cx := 346;&#xA;      Bx := 20021;&#xA;      Tmp := Ax;&#xA;      Ax := FSi;&#xA;      FSi := Tmp;&#xA;      Tmp := Ax;&#xA;      Ax := Dx;&#xA;      Dx := Tmp;&#xA;      if Ax &amp;lt;&amp;gt; 0 then&#xA;        Ax := Ax * Bx;  &amp;lt;==== this causes overflow crashing the app&#xA;      Tmp := Ax;&#xA;      Ax := Cx;&#xA;      Cx := Tmp;&#xA;      if Ax &amp;lt;&amp;gt; 0 then&#xA;        begin&#xA;          Ax := Ax * FSi;&#xA;          Cx := Cx &#x2B; Ax;&#xA;        end;&#xA;      Tmp := Ax;&#xA;      Ax := FSi;&#xA;      FSi := Tmp;&#xA;      Ax := Ax * Bx;&#xA;      Dx := Dx &#x2B; Cx;&#xA;      IncrAfter(Ax);&#xA;      FX1a2 := Dx;&#xA;      FX1a0[I] := Ax;&#xA;      Result := Ax xor Dx;&#xA;    end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;After further work, I have the following:&lt;/p&gt;&#xA;&lt;p&gt;Integer overflow is occurring in&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;  unit Data.DBXEncryption&#xA;  function TPC1Cypher.Code(const I: Integer): Integer; &#xA; &#xA;  // lines (as above)..&#xA;&#xA;  if Ax &amp;lt;&amp;gt; 0 then&#xA;    Ax := Ax * Bx;  &amp;lt;==== overflow exception raised in main app, NOT in simple app.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The TSQLConnection component is generating an integer overflow error in the above module and code when setting the SQLConnection connected property to True.&lt;/p&gt;&#xA;&lt;p&gt;To verify the error, I created a small simple app that makes the same calls as my main app.&lt;/p&gt;&#xA;&lt;p&gt;I verified the SQLConnection properties and parameters between the simple app and the main app are identical.&lt;/p&gt;&#xA;&lt;p&gt;This simple app runs without error.  I checked its project options and Overflow checking was off.&lt;/p&gt;&#xA;&lt;p&gt;Now I checked the project options for my main app and found Overflow checking was true, or on.&lt;/p&gt;&#xA;&lt;p&gt;So naturally I thought this was the issue, so I set this to off (false)&lt;/p&gt;&#xA;&lt;p&gt;Ran my main app with this option change, and I still received the Integer overflow error!&lt;/p&gt;&#xA;&lt;p&gt;Stepping through the code of the simple app, execution continues through the line noted above without error, Ax := Ax * Bx.&lt;/p&gt;&#xA;&lt;p&gt;Stepping through the code of the main app, execution is aborted at the line &lt;code&gt;Ax := Ax * Bx&lt;/code&gt; with overflow error.&lt;/p&gt;&#xA;&lt;p&gt;So now I added the directive &lt;code&gt;{$Q}&lt;/code&gt; to my main app and still get the overflow error.&#xA;I&#x27;ve searched my files, and nowhere do I see an option to set overflow checking on other than in Project Options, where it is now off.&lt;/p&gt;&#xA;&lt;p&gt;I&#x27;m baffled.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79909904</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">How to use Excel4Delphi with Delphi XE7?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-xe7" />
        <author>
            <name>Eli Kihara</name>
            <uri>https://stackoverflow.com/users/23752997</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79909904/how-to-use-excel4delphi-with-delphi-xe7" />
        <published>2026-03-18T11:06:28Z</published>
        <updated>2026-03-20T22:08:38Z</updated>
        <summary type="html">
            &lt;p&gt;We are working on an application in Delphi XE7, and we need to read and write data to Excel. We have been using HotXLS to export the data, but cannot get around to have it read the Excel data.&lt;/p&gt;&#xA;&lt;p&gt;We have been trying to use Excel4Delphi, but it appears to be for later versions of Delphi.&lt;/p&gt;&#xA;&lt;p&gt;Does anyone have a port of it for Delphi XE7, or a similar recommendation that does not require Excel to be installed?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79908470</id>
        <re:rank scheme="https://stackoverflow.com">2</re:rank>
        <title type="text">Why would anyone use VCL when there is FMX?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="firemonkey" />
            <category scheme="https://stackoverflow.com/tags" term="vcl" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-13-florence" />
        <author>
            <name>user31362432</name>
            <uri>https://stackoverflow.com/users/31362432</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79908470/why-would-anyone-use-vcl-when-there-is-fmx" />
        <published>2026-03-16T11:47:58Z</published>
        <updated>2026-04-13T19:19:50Z</updated>
        <summary type="html">
            &lt;p&gt;At my company, our older developers keep insisting to use VCL for projects and I really do not understand why. They do not seem to know why either. They just say use VCL because it is better and FMX has many issues.&lt;/p&gt;&#xA;&lt;p&gt;Our apps run on Windows, but why limit ourselves to Windows when we do not have to with FMX is what I am just thinking every time they tell me to use VCL.&lt;/p&gt;&#xA;&lt;p&gt;Can someone give some advice here as to why people are choosing VCL over FMX?&lt;/p&gt;&#xA;
        </summary>
    </entry>
</feed>