<?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-04-15T01:43:48Z</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/79924336</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">Access violation assigning value to TImage.Top</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
        <author>
            <name>Skypilot65</name>
            <uri>https://stackoverflow.com/users/11222817</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79924336/access-violation-assigning-value-to-timage-top" />
        <published>2026-04-12T13:37:23Z</published>
        <updated>2026-04-12T15:03:18Z</updated>
        <summary type="html">
            &lt;p&gt;I am in the process of developing a card game in Delphi. I am getting an access violation from the last line of the following code. The value being assigned at the time of the error into &lt;code&gt;.Top&lt;/code&gt; is &lt;code&gt;500&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;type&#xA;  PlayerRec = record&#xA;    PType : PlayerType;&#xA;    PName : string;&#xA;    PAmount: integer;&#xA;    PBetAmt: array[1..4] of integer;&#xA;    PHands: integer;&#xA;    PNumCards: array[1..4] of integer;&#xA;    PTotalHand: array[1..4] of integer;&#xA;    PCards: array[1..4,1..15] of CardRec;&#xA;    PImages: array[1..4,1..15] of TImage;&#xA;  end;&#xA;&#xA;var&#xA;  Player: Array of PlayerRec;&#xA;  CardFace: Array[1.. 52] of TImage;&#xA;&#xA;begin&#xA;  Player[x].PCards[1,cid]:=Deck[CardOrder[cidx]];&#xA;  Player[x].PImages[1,cid]:=TImage.Create(nil);&#xA;  Player[x].PImages[1,cid].Parent:=Form1;&#xA;  Player[x].PImages[1,cid]:=CardFace[Deck[CardOrder[cidx]].ImageIdx];&#xA;  Player[x].PImages[1,cid].Top:=CardXYPos[x,2];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If the &lt;code&gt;TImage&lt;/code&gt; wasn&#x27;t being created properly I would expect the &lt;code&gt;.Parent:=Form1;&lt;/code&gt; to fail as well, right long with the actual card image assignment &lt;code&gt;CardFace[Deck[CardOrder[cidx]].ImageIdx];&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If someone has any insight I would appreciate it.&lt;/p&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-13T16:14:46Z</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-03-27T13:49:29Z</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-03-22T06:03:58Z</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>
    <entry>
        <id>https://stackoverflow.com/q/79906414</id>
        <re:rank scheme="https://stackoverflow.com">-2</re:rank>
        <title type="text">How to show color emojis in TMemo? [duplicate]</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-12-athens" />
        <author>
            <name>delphirules</name>
            <uri>https://stackoverflow.com/users/1718632</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79906414/how-to-show-color-emojis-in-tmemo" />
        <published>2026-03-12T17:42:52Z</published>
        <updated>2026-03-12T17:42:52Z</updated>
        <summary type="html">
            &lt;p&gt;When using TMemo, all emojis are shown black and white, no matter if you paste a yellow emoji like  &#x1F600;, it will show black and white like :&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.sstatic.net/19O7YeN3.png&quot; alt=&quot;An emoji in TMEmo&quot; title=&quot;Example&quot; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;I&#x27;m using Delphi 12. Tried also with TRichEdit, same issue.&lt;/p&gt;&#xA;&lt;p&gt;I know there is some third-party components that achieve this, but i&#x27;d like to use only stock components... is it possible ?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79902294</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">In a Delphi/FireDac/SQL setup how do you manage multiple database connections in a RAD way?</title>
            <category scheme="https://stackoverflow.com/tags" term="sql-server" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="firedac" />
        <author>
            <name>Richard Shuck</name>
            <uri>https://stackoverflow.com/users/12215803</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79902294/in-a-delphi-firedac-sql-setup-how-do-you-manage-multiple-database-connections-in" />
        <published>2026-03-06T13:15:20Z</published>
        <updated>2026-03-06T22:59:28Z</updated>
        <summary type="html">
            &lt;p&gt;I have a mature business program doing the standard handling all the standard stuff of editing customers, products etc all running fine with a SQL Server backend using MARS in the connection string which allows multiple open queries on the same connection.&lt;/p&gt;&#xA;&lt;p&gt;I wanted to remove the requirement for MARS as intend to support PostgreSQL and understand it is not supported and would receive the error&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Connection is busy with results for another command&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Without MARS I cannot have two queries open using the same connection unless I fetch all records from a query before opening the next.&lt;/p&gt;&#xA;&lt;p&gt;Handling this programatically I can work with as you have a natural start to finish of a process and would be something like this&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;var Connection:=TFDConnection.Create;&#xA;var Query1:=TFDQuery.Create;&#xA;Query1.Connection:=Connection;&#xA;Query1.SQL.Text:=&#x27;SELECT * FROM MASTER&#x27;&#xA;Query1.Open;&#xA;Query1.FetchAll;  &amp;lt;----- required&#xA;&#xA;var Query2:=TFDQuery.Create;&#xA;Query2.Connection:=Connection;&#xA;Query2.SQL.Text:=&#x27;SELECT * FROM DETAIL&#x27;;&#xA;Query2.Open;&#xA;&#xA;Query2.Free;&#xA;Query1.Free;&#xA;Connection.Free;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;In a RAD way however the best approach is not so straight forward.&lt;/p&gt;&#xA;&lt;p&gt;On a single form you could have 10&#x2B; active queries coming together to produce a UI edit screen with lookup tables for comboboxes, tables of history etc. and you may have many of these forms open.&lt;/p&gt;&#xA;&lt;p&gt;In this scenario I can only think that you would need to use a seperate database connection per form and all queries would need to have their FetchMode set to all.&lt;/p&gt;&#xA;&lt;p&gt;Having a separate connection per form would not introduce much of an issue but setting the fetch mode to all loses the benefits fetch on demand brings.&lt;/p&gt;&#xA;&lt;p&gt;Say on a form we had a customer&#x27;s details and lookup tables for combo boxes using one connection.  All the queries would be set to fetch all so they can share the connection.&lt;/p&gt;&#xA;&lt;p&gt;Then we want to add a grid showing the customer&#x27;s previous purchases, which could be a huge list so want to use fetch on demand.  This would dictate that another connection would be required just for this list.&lt;/p&gt;&#xA;&lt;p&gt;This makes logical sense but does require you to be careful when designing the forms because if you forget one fetch all setting on a query it&#x27;s going to fail.&lt;/p&gt;&#xA;&lt;p&gt;My cause for pause is that everything I find be it defaults in Rad Studio such as FetchMode on TFDQueries, FireDac samples or internet searches don&#x27;t even nod a head to using multiple connections this way they only mention using a different connection per thread which is a no brainer.&lt;/p&gt;&#xA;&lt;p&gt;So to the question, am I right?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79902259</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">Exception on EnumHostAddresses in constructor TApdCustomWinsockPort.Create(AOwner : TComponent);</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-13-florence" />
            <category scheme="https://stackoverflow.com/tags" term="turbopower" />
        <author>
            <name>Dennis van Vugt</name>
            <uri>https://stackoverflow.com/users/23044011</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79902259/exception-on-enumhostaddresses-in-constructor-tapdcustomwinsockport-createaowne" />
        <published>2026-03-06T12:02:09Z</published>
        <updated>2026-03-06T12:02:09Z</updated>
        <summary type="html">
            &lt;p&gt;I am working in a Delphi12/13 dll. I use a TApdWinsockPort component on the form of the dll.&lt;br /&gt;&#xA;During a called Initialize procedure in the dll from the host exe, I use Application.CreateForm. During this I get an exception in EnumHostAddresses on the line:&lt;br /&gt;&#xA;&lt;code&gt;if SockFuncs.GetHostName (@HostStr, SizeOf (HostStr)) = 0 then begin&lt;/code&gt;&lt;br /&gt;&#xA;The exception is the foloowing:&lt;br /&gt;&#xA;First chance exception at $00000000. Exception class $C0000005 with message &#x27;access violation at 0x00000000: access of address 0x00000000&#x27;. Process uniwin.exe (24496)&lt;/p&gt;&#xA;&lt;p&gt;If I start debugging I see that SockFuncs not initialised. None of the functions have a function pointer assigned to them (nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil)&lt;/p&gt;&#xA;&lt;p&gt;After some more debugging (also using the original Delphi5 dll) and looking around I noticed the following lines in AwWnsock&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;  if not IsLibrary then //SZ: bugfix Loader Lock Problem!! (never ever call LoadLibrary from initialization / dllmain)&#xA;    ApdSocket := TApdDeviceSocket.Create(nil);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So due to the fact i am working in a dll winsock functionality will not be loaded?&lt;br /&gt;&#xA;Has anyone encountered this as well with the new Asyncpro?&lt;br /&gt;&#xA;And since I do need Winsock functionality is their a way to work around this?&lt;/p&gt;&#xA;&lt;p&gt;For my testapplications (dll &#x2B; exe) you can look on the Turbopack github and then issue 42 under closed. In my second response is my latest test version.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://github.com/TurboPack/AsyncPro/issues/42&quot; rel=&quot;nofollow noreferrer&quot;&gt;Link for testapplications&lt;/a&gt;&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79895348</id>
        <re:rank scheme="https://stackoverflow.com">2</re:rank>
        <title type="text">Indy 10 TCPServer and SSL certificate verifying issue (error 20, SSL alert number 48)</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="ssl" />
            <category scheme="https://stackoverflow.com/tags" term="openssl" />
            <category scheme="https://stackoverflow.com/tags" term="indy" />
            <category scheme="https://stackoverflow.com/tags" term="tcpserver" />
        <author>
            <name>loltrol</name>
            <uri>https://stackoverflow.com/users/1343844</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79895348/indy-10-tcpserver-and-ssl-certificate-verifying-issue-error-20-ssl-alert-numbe" />
        <published>2026-02-24T11:04:12Z</published>
        <updated>2026-03-03T16:41:23Z</updated>
        <summary type="html">
            &lt;p&gt;I am developing an application, which has a built-in TCP server. I want the server to be secure via OpenSSL. The server has to identify its clients and the clients must identify the server.&lt;/p&gt;&#xA;&lt;p&gt;If I understand correctly how the SSL is working, I need RSA pairs - private key and public key, latter is enveloped in certificate - for the server and the clients, and their certificates must be signed by a private key of some root RSA pair (CA).&lt;/p&gt;&#xA;&lt;p&gt;So, I generate them like this:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;:: root&#xA;openssl genrsa -out RootCA.key 2048&#xA;openssl req -x509 -new -nodes -key RootCA.key -sha256 -days 3650 -out RootCA.crt -subj &amp;quot;/CN=test&amp;quot; -passin pass:&amp;lt;...&amp;gt;&#xA;&#xA;:: server&#xA;openssl genrsa -out Server.key 2048&#xA;openssl req -new -key Server.key -out Server.csr -subj &amp;quot;/CN=localhost&amp;quot;&#xA;openssl x509 -req -in Server.csr -CA RootCA.crt -CAkey RootCA.key -CAcreateserial -out Server.crt -days 365 -sha256 -passin pass:&amp;lt;...&amp;gt; -extfile server.cnf -extensions EXT&#xA;:: server.cnf contains, among other things, local ip of the server&#xA;&#xA;openssl verify -CAfile RootCA.crt Server.crt&#xA;:: result is OK&#xA;&#xA;:: client&#xA;openssl genrsa -out Client.key 2048&#xA;openssl req -new -key Client.key -out Client.csr&#xA;openssl x509 -req -in Client.csr -CA RootCA.crt -CAkey RootCA.key -CAcreateserial -out Client.crt -days 365 -sha256 -passin pass:&amp;lt;...&amp;gt;&#xA;&#xA;openssl verify -CAfile RootCA.crt Client.crt&#xA;:: result is OK&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I check the result with &lt;code&gt;openssl.exe&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;openssl s_server -accept 9090 -cert Server.crt -key Server.key -CAfile RootCA.crt -verify_return_error&#xA;openSSL s_client -connect localhost:9090 -cert Client.crt -key Client.key -CAfile RootCA.crt -verify_return_error&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The connection is established successfully. Some of the client&#x27;s output:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;CONNECTED(00000200)&#xA;Can&#x27;t use SSL_get_servername&#xA;depth=1 CN = test&#xA;verify return:1&#xA;depth=0 CN = localhost&#xA;verify return:1&#xA;---&#xA;Certificate chain&#xA;0 s:CN = localhost&#xA;  i:CN = test&#xA;1 s:CN = test&#xA;  i:CN = test&#xA;&#xA;&amp;lt;...&amp;gt;&#xA;&#xA;Start Time: 1771926126  &#xA;Timeout   : 7200 (sec)  &#xA;Verify return code: 0 (ok)  &#xA;Extended master secret: no  &#xA;Max Early Data: 0  &#xA;---&#xA;read R BLOCK&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;To summarize:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;p&gt;I provide the server its private key to do decryption and certificate to be sent to the client for encryption and identification, and also root certificate to verify the client&#x27;s certificate;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I provide the client its private key to do decryption and certificate to be sent to the server for encryption and identification, and also root certificate to verify the server&#x27;s certificate.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Both the identifying and encryption tasks seems to be achieved.&lt;/p&gt;&#xA;&lt;p&gt;But, I have trouble with implementing the scheme in Delphi with Indy&#x27;s &lt;code&gt;TIdTCPServer&lt;/code&gt; and &lt;code&gt;TIdServerIOHandlerSSLOpenSSL&lt;/code&gt; components.&lt;/p&gt;&#xA;&lt;p&gt;This is how I create the handler (&lt;code&gt;TTCPServer&lt;/code&gt; is inherited from &lt;code&gt;TIdTCPServer&lt;/code&gt;):&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;constructor TTCPServer.Create;&#xA;var&#xA;  LIdServerIOHandlerSSLOpenSSL: TIdServerIOHandlerSSLOpenSSL;&#xA;begin&#xA;  inherited;&#xA;&#xA;  OnConnect:=Connect;&#xA;  OnExecute:=Execute;&#xA;&#xA;  DefaultPort:=9090;&#xA;&#xA;  LIdServerIOHandlerSSLOpenSSL:=TIdServerIOHandlerSSLOpenSSL.Create(Self);&#xA;  try&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.Mode:=sslmServer;&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.SSLVersions:=[sslvSSLv23];&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.RootCertFile:=&#x27;RootCA.crt&#x27;;&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.CertFile:=&#x27;Server.crt&#x27;;&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.KeyFile:=&#x27;Server.key&#x27;;&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.VerifyMode:=[sslvrfPeer, sslvrfFailIfNoPeerCert, sslvrfClientOnce];&#xA;    LIdServerIOHandlerSSLOpenSSL.OnVerifyPeer:=VerifyPeer;&#xA;  finally&#xA;    IOHandler:=LIdServerIOHandlerSSLOpenSSL;&#xA;  end;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;procedure TTCPServer.Connect(AContext: TIdContext);&#xA;begin&#xA;  with AContext.Connection.IOHandler as TIdSSLIOHandlerSocketBase do&#xA;    PassThrough:=False;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;function TTCPServer.VerifyPeer(Certificate: TIdX509; AOk: Boolean; ADepth, AError: Integer): Boolean;&#xA;begin&#xA;  Result:=AOk;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I run &lt;code&gt;openssl.exe&lt;/code&gt; as before:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;openSSL s_client -connect localhost:9090 -cert Client.crt -key Client.key -CAfile RootCA.crt -verify_return_error&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;But the client&#x27;s certificate is never valid. &lt;code&gt;AError&lt;/code&gt; is &lt;code&gt;20&lt;/code&gt; (&lt;code&gt;X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY&lt;/code&gt;). In &lt;code&gt;openssl&lt;/code&gt;&#x27;s console, the output is such:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;CONNECTED(00000200)&#xA;Can&#x27;t use SSL_get_servername&#xA;depth=1 CN = test&#xA;verify return:1&#xA;depth=0 CN = localhost&#xA;verify return:1&#xA;14212:error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:ssl\record\rec_layer_s3.c:1544:SSL alert number 48&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;If I understand it correctly, error &lt;code&gt;20&lt;/code&gt; indicates that the server cannot find the certificate which was used to sign the client&#x27;s certificate. But isn&#x27;t it the &lt;code&gt;SSLOptions.RootCertFile&lt;/code&gt;, which I explicitly provide in my code?&lt;/p&gt;&#xA;&lt;p&gt;What am I doing wrong?&lt;/p&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let me provide the MRE.&lt;/p&gt;&#xA;&lt;p&gt;Application:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;program CertificateVerificationIssueMRE;&#xA;&#xA;{$APPTYPE CONSOLE}&#xA;&#xA;{$R *.res}&#xA;&#xA;uses&#xA;  System.SysUtils, System.Classes,&#xA;  IdTCPServer, IdSSLOpenSSL, IdSSL, IdContext,&#xA;  IdSSLOpenSSLHeaders, IdCTypes;&#xA;&#xA;type&#xA;  TMRETCPServer = class (TIdTCPServer)&#xA;  protected&#xA;    function VerifyPeer(Certificate: TIdX509; AOk: Boolean; ADepth, AError: Integer): Boolean;&#xA;    procedure StatusInfo(const AMessage: String);&#xA;    procedure StatusInfoEx(ASender: TObject; const AsslSocket: PSSL; const AWhere, Aret: TIdC_INT; const AType, AMsg: String);&#xA;&#xA;    procedure Connect(AContext: TIdContext);&#xA;    procedure Execute(AContext: TIdContext);&#xA;  public&#xA;    constructor Create(AOwner: TComponent);&#xA;  end;&#xA;&#xA;function TMRETCPServer.VerifyPeer(Certificate: TIdX509; AOk: Boolean; ADepth, AError: Integer): Boolean;&#xA;begin&#xA;  WriteLn(Format(&#x27;VerifyPeer: %s (%d)&#x27;, [BoolToStr(AOk, True), AError]));&#xA;  Result:=AOk;&#xA;end;&#xA;&#xA;procedure TMRETCPServer.StatusInfo(const AMessage: String);&#xA;begin&#xA;  WriteLn(AMessage);&#xA;end;&#xA;&#xA;procedure TMRETCPServer.StatusInfoEx(ASender: TObject; const AsslSocket: PSSL; const AWhere, Aret: TIdC_INT; const AType, AMsg: String);&#xA;begin&#xA;  WriteLn(Format(&#x27;%s: %s&#x27;, [AType, AMsg]));&#xA;end;&#xA;&#xA;procedure TMRETCPServer.Connect(AContext: TIdContext);&#xA;begin&#xA;  with AContext.Connection.IOHandler as TIdSSLIOHandlerSocketBase do&#xA;    PassThrough:=False;&#xA;end;&#xA;&#xA;constructor TMRETCPServer.Create(AOwner: TComponent);&#xA;var&#xA;  LIdServerIOHandlerSSLOpenSSL: TIdServerIOHandlerSSLOpenSSL;&#xA;begin&#xA;  inherited;&#xA;&#xA;  OnConnect:=Connect;&#xA;  OnExecute:=Execute;&#xA;&#xA;  DefaultPort:=9090;&#xA;&#xA;  LIdServerIOHandlerSSLOpenSSL:=TIdServerIOHandlerSSLOpenSSL.Create(Self);&#xA;  try&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.Mode:=sslmServer;&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.SSLVersions:=[sslvSSLv23];&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.RootCertFile:=&#x27;C:\Program Files (x86)\OpenSSL-Win32\bin\RootCA.crt&#x27;;&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.CertFile:=&#x27;C:\Program Files (x86)\OpenSSL-Win32\bin\Server.crt&#x27;;&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.KeyFile:=&#x27;C:\Program Files (x86)\OpenSSL-Win32\bin\Server.key&#x27;;&#xA;    LIdServerIOHandlerSSLOpenSSL.SSLOptions.VerifyMode:=[sslvrfPeer, sslvrfFailIfNoPeerCert, sslvrfClientOnce];&#xA;    LIdServerIOHandlerSSLOpenSSL.OnVerifyPeer:=VerifyPeer;&#xA;    LIdServerIOHandlerSSLOpenSSL.OnStatusInfoEx:=StatusInfoEx;&#xA;  finally&#xA;    IOHandler:=LIdServerIOHandlerSSLOpenSSL;&#xA;  end;&#xA;&#xA;  Active:=True;&#xA;end;&#xA;&#xA;procedure TMRETCPServer.Execute(AContext: TIdContext);&#xA;begin&#xA;  WriteLn(AContext.Connection.IOHandler.ReadLn);&#xA;end;&#xA;&#xA;begin&#xA;  try&#xA;    with TMRETCPServer.Create(nil) do&#xA;    try&#xA;      while True do;&#xA;    finally&#xA;      Free;&#xA;    end;&#xA;  except&#xA;    on E: Exception do&#xA;      Writeln(E.ClassName, &#x27;: &#x27;, E.Message);&#xA;  end;&#xA;end.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;OpenSSL generation and command to connect:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;openssl genrsa -out RootCA.key 2048&#xA;&#xA;openssl req -x509 -new -nodes -key RootCA.key -sha256 -days 3650 -out RootCA.crt -subj &amp;quot;/CN=ROOT&amp;quot; -passin pass:root&#xA;&#xA;openssl genrsa -out Server.key 2048&#xA;&#xA;openssl req -new -key Server.key -out Server.csr -subj &amp;quot;/CN=localhost&amp;quot;&#xA;&#xA;openssl x509 -req -in Server.csr -CA RootCA.crt -CAkey RootCA.key -CAcreateserial -out Server.crt -days 365 -sha256 -passin pass:root&#xA;&#xA;openssl genrsa -out Client.key 2048&#xA;&#xA;openssl req -new -key Client.key -out Client.csr -subj &amp;quot;/CN=localhost&amp;quot;&#xA;&#xA;openssl x509 -req -in Client.csr -CA RootCA.crt -CAkey RootCA.key -CAcreateserial -out Client.crt -days 365 -sha256 -passin pass:root&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;openSSL s_client -connect localhost:9090 -cert Client.crt -key Client.key -CAfile RootCA.crt -verify_return_error &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr /&gt;&#xA;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;After spending some hours delving into the OpenSSL world and Indy implementation, I have not found the source of my problem, but came to a workaround (maybe &amp;quot;dirty&amp;quot; in some ways?). I perform manual verification in the &lt;code&gt;VerifyPeer&lt;/code&gt; callback:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;uses&#xA;  &amp;lt;...&amp;gt;&#xA;  IdSSLOpenSSLHeaders, IdCTypes;&#xA;&#xA;&amp;lt;...&amp;gt;&#xA;&#xA;  function X509_STORE_new: PX509_STORE; cdecl; external &#x27;libeay32.dll&#x27;;&#xA;  procedure X509_STORE_free(store: PX509_STORE); cdecl; external &#x27;libeay32.dll&#x27;;&#xA;  function X509_STORE_CTX_new: PX509_STORE_CTX; cdecl; external &#x27;libeay32.dll&#x27;;&#xA;  procedure X509_STORE_CTX_free(store_context: PX509_STORE_CTX); cdecl; external &#x27;libeay32.dll&#x27;;&#xA;  function X509_STORE_CTX_init(store_context: PX509_STORE_CTX; store: PX509_STORE; x509: PX509; chain: PSTACK_OF_X509): TIdC_INT; cdecl; external &#x27;libeay32.dll&#x27;;&#xA;  function X509_verify_cert(store_context: PX509_STORE_CTX): TIdC_INT; cdecl; external &#x27;libeay32.dll&#x27;;&#xA;&#xA;&amp;lt;...&amp;gt;&#xA;&#xA;function TMRETCPServer.VerifyPeer(Certificate: TIdX509; AOk: Boolean; ADepth, AError: Integer): Boolean;&#xA;var&#xA;  LSSLContext:        TIdSSLContext;&#xA;  LPX509Store:        PX509_STORE;&#xA;  LPX509StoreContext: PX509_STORE_CTX;&#xA;  LResult:            TIdC_INT;&#xA;begin&#xA;  if AOk then Exit(True);&#xA;&#xA;  if ADepth=0 then&#xA;  begin&#xA;    LPX509Store:=X509_STORE_new;&#xA;    try&#xA;      LSSLContext:=TIdServerIOHandlerSSLOpenSSL(IOHandler).SSLContext;&#xA;      if X509_STORE_load_locations(LPX509Store, PAnsiChar(AnsiString(LSSLContext.RootCertFile)), nil)=1 then&#xA;      begin&#xA;        LPX509StoreContext:=X509_STORE_CTX_new;&#xA;        try&#xA;          if X509_STORE_CTX_init(LPX509StoreContext, LPX509Store, Certificate.Certificate, nil)=1 then&#xA;          begin&#xA;            LResult:=X509_verify_cert(LPX509StoreContext);&#xA;            AOk:=LResult=1;&#xA;            if AOk then&#xA;              AError:=0&#xA;            else&#xA;              AError:=X509_STORE_CTX_get_error(LPX509StoreContext);&#xA;          end;&#xA;        finally&#xA;          X509_STORE_CTX_free(LPX509StoreContext);&#xA;        end;&#xA;      end;&#xA;    finally&#xA;      X509_STORE_free(LPX509Store);&#xA;    end;&#xA;  end;&#xA;&#xA;  Result:=AOk;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The same certificate (&lt;code&gt;Certificate.Certificate&lt;/code&gt;) that inner routines of OpenSSL failed to verify is then successfully verified via explicit call to &lt;code&gt;X509_verify_cert&lt;/code&gt; with the same root CA certificate (&lt;code&gt;LSSLContext.RootCertFile&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;I tried to use &lt;code&gt;X509_STORE_load_locations&lt;/code&gt; with second argument for loading root certificate in &lt;code&gt;IdSSLOpenSSL&lt;/code&gt; in &lt;code&gt;IndyX509_STORE_load_locations&lt;/code&gt; (line 1719), but still no success. It look like OpenSSL stubbornly does not use the loaded root certificate.&#xA;I have a feeling there could be an issue with selecting the certificate from the store. Maybe some small option is crucial (AI suggests to look into &lt;code&gt;X509_VERIFY_PARAM_set_flags&lt;/code&gt;, but I have not do that). But, what confuses me the most is that OpenSSL&#x27;s CLI successfully verifies the certificate without setting any options.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79895070</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">How to find a character at a given mouse position?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="position" />
            <category scheme="https://stackoverflow.com/tags" term="character" />
            <category scheme="https://stackoverflow.com/tags" term="vcl" />
        <author>
            <name>Neil Howie</name>
            <uri>https://stackoverflow.com/users/26735154</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79895070/how-to-find-a-character-at-a-given-mouse-position" />
        <published>2026-02-24T00:36:18Z</published>
        <updated>2026-02-27T13:23:53Z</updated>
        <summary type="html">
            &lt;p&gt;Given an x,y position from a mouse event, can I find the character (e.g. of a string in a ListBox) at that position? I want to do this to test the character and process the mouse event accordingly, rather than merely selecting the string.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79894876</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">How to make Chart Title Bold in TMS FNC Charts using Delphi FMX?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="charts" />
            <category scheme="https://stackoverflow.com/tags" term="firemonkey" />
            <category scheme="https://stackoverflow.com/tags" term="tms" />
            <category scheme="https://stackoverflow.com/tags" term="tms-fnc" />
        <author>
            <name>user31362432</name>
            <uri>https://stackoverflow.com/users/31362432</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79894876/how-to-make-chart-title-bold-in-tms-fnc-charts-using-delphi-fmx" />
        <published>2026-02-23T18:59:16Z</published>
        <updated>2026-02-23T19:21:58Z</updated>
        <summary type="html">
            &lt;p&gt;I don&#x27;t know what I&#x27;m doing but I need the chart title to be bold. I have tried this and variations of this, but nothing works:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Chart.Title.Font.Style := Chart.Title.Font.Style &#x2B; [fsBold];&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;[dcc64 Error] myChart.pas(450): E2003 Undeclared identifier: &#x27;fsBold&#x27;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;How do you make the chart title be bold?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79892743</id>
        <re:rank scheme="https://stackoverflow.com">6</re:rank>
        <title type="text">Delphi Linux TEvent.SetEvent thread safety</title>
            <category scheme="https://stackoverflow.com/tags" term="linux" />
            <category scheme="https://stackoverflow.com/tags" term="multithreading" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="thread-safety" />
            <category scheme="https://stackoverflow.com/tags" term="pascal" />
        <author>
            <name>qgi</name>
            <uri>https://stackoverflow.com/users/4227694</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79892743/delphi-linux-tevent-setevent-thread-safety" />
        <published>2026-02-20T07:37:28Z</published>
        <updated>2026-02-20T20:38:01Z</updated>
        <summary type="html">
            &lt;p&gt;Under Delphi for Linux, &lt;code&gt;TEvent.SetEvent()&lt;/code&gt; is implemented as follows:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;procedure TEvent.SetEvent;&#xA;var&#xA;  I: Integer;&#xA;begin&#xA;  sem_getvalue(FEvent, I);&#xA;  if I = 0 then&#xA;    sem_post(FEvent);&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Although &lt;code&gt;sem_getvalue()&lt;/code&gt; is thread-safe itself, according to Linux docs: &lt;a href=&quot;https://man7.org/linux/man-pages/man3/sem_getvalue.3.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://man7.org/linux/man-pages/man3/sem_getvalue.3.html&lt;/a&gt;, the value may change after that (obviously), it is rather a snapshot of the value.&lt;/p&gt;&#xA;&lt;p&gt;If I have multiple threads waiting for the same event object, wouldn&#x27;t &lt;code&gt;SetEvent()&lt;/code&gt; have a thread safety issue, that the value happens to be non-zero, and &lt;code&gt;WaitFor()&lt;/code&gt; could miss some fired events?&lt;/p&gt;&#xA;&lt;p&gt;Also, in Windows and macOS, &lt;code&gt;SetEvent()&lt;/code&gt; directly calls an OS API, which does not have this issue:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;procedure TEvent.SetEvent;&#xA;{$IFDEF MSWINDOWS}&#xA;begin&#xA;  Winapi.Windows.SetEvent(Handle);&#xA;end;&#xA;{$ENDIF MSWINDOWS}&#xA;{$IFDEF MACOS}&#xA;begin&#xA;  dispatch_semaphore_signal(FEvent);&#xA;end;&#xA;{$ENDIF MACOS}&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Why does the Linux implementation need the extra check?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79891354</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">TDirect2DCanvas versus TCanvas regarding TPenMode</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="drawing" />
            <category scheme="https://stackoverflow.com/tags" term="vcl" />
            <category scheme="https://stackoverflow.com/tags" term="direct2d" />
            <category scheme="https://stackoverflow.com/tags" term="tcanvas" />
        <author>
            <name>kishmet</name>
            <uri>https://stackoverflow.com/users/10912218</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79891354/tdirect2dcanvas-versus-tcanvas-regarding-tpenmode" />
        <published>2026-02-18T07:22:01Z</published>
        <updated>2026-02-24T10:16:38Z</updated>
        <summary type="html">
            &lt;p&gt;I am currently trying to switch from &lt;code&gt;TCanvas&lt;/code&gt; to &lt;code&gt;TDirect2DCanvas&lt;/code&gt; for some drawing routines, as I want to speed things up a little bit. I have stumbled upon the missing &lt;code&gt;TPenMode&lt;/code&gt;. I did not find a suitable setting to implement, for example, &lt;code&gt;pmNot&lt;/code&gt; with &lt;code&gt;TDirect2DCanvas&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Is this really completely missing? Is there a workaround? Or will I have to switch back to &lt;code&gt;TCanvas&lt;/code&gt; to use &lt;code&gt;TPenMode&lt;/code&gt;s? If so: How would this effect the &lt;code&gt;BeginDraw&lt;/code&gt;/&lt;code&gt;EndDraw&lt;/code&gt; feature?&lt;/p&gt;&#xA;&lt;p&gt;Obviously, some other function/property which has the same effect as &lt;code&gt;TPenMode&lt;/code&gt; with &lt;code&gt;pmNot&lt;/code&gt; (and the others) would to the trick, too. If something like this exists, I would appreciate a hint where to look for it.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79891200</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">How to change the line thickness with code on TMS FNC Chart?</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="firemonkey" />
            <category scheme="https://stackoverflow.com/tags" term="tms" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-13-florence" />
            <category scheme="https://stackoverflow.com/tags" term="tms-fnc" />
        <author>
            <name>user31362432</name>
            <uri>https://stackoverflow.com/users/31362432</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79891200/how-to-change-the-line-thickness-with-code-on-tms-fnc-chart" />
        <published>2026-02-17T22:07:34Z</published>
        <updated>2026-02-17T22:14:53Z</updated>
        <summary type="html">
            &lt;p&gt;I have a line chart with multiple lines, but the line thickness isn&#x27;t enough.&lt;/p&gt;&#xA;&lt;p&gt;How do I actually increase the line thickness with code?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79889076</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">Panning with TStringGrid (VCL)</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="touch" />
            <category scheme="https://stackoverflow.com/tags" term="vcl" />
            <category scheme="https://stackoverflow.com/tags" term="tstringgrid" />
        <author>
            <name>Tim</name>
            <uri>https://stackoverflow.com/users/6020267</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79889076/panning-with-tstringgrid-vcl" />
        <published>2026-02-13T23:02:57Z</published>
        <updated>2026-02-14T10:06:04Z</updated>
        <summary type="html">
            &lt;p&gt;I have a TStringGrid with several hundred rows of data in it. I want to enable the user to scroll through the data by panning (ie using their finger to pan up or down) on a touch-screen device.&lt;/p&gt;&#xA;&lt;p&gt;I have the following options set for the grid:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;      Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRowMoving, goEditing, goRowSelect, goThumbTracking, goFixedRowClick, goFixedHotTrack, goFixedRowDefAlign]&#xA;      TabOrder = 0&#xA;      Touch.InteractiveGestures = [igPan]&#xA;      Touch.InteractiveGestureOptions = [igoPanSingleFingerVertical, igoPanInertia]&#xA;      Touch.ParentTabletOptions = False&#xA;      Touch.TabletOptions = []&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I do not have a GestureManager.&lt;/p&gt;&#xA;&lt;p&gt;Touch and drag works nicely. The grid content will scroll up and down following your finger.&lt;/p&gt;&#xA;&lt;p&gt;Tapping works well. Tapping on a row selects the row.&lt;/p&gt;&#xA;&lt;p&gt;When panning up or down, the initial motion is fine. The grid will start scrolling and continue with inertia. If you wait until the inertia timer times out then the second motion is also fine. But if you try a second motion before the inertia timer times out, the grid stops scrolling. It won&#x27;t start responding again until you wait for the timer to finish.&lt;/p&gt;&#xA;&lt;p&gt;I&#x27;ve got this code in the OnGesture event&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;procedure TForm2.GrdVehiclesGesture(Sender: TObject; const EventInfo: TGestureEventInfo; var Handled: Boolean);&#xA;var&#xA;  InertiaActiveChanged: Boolean;&#xA;begin&#xA;  if EventInfo.GestureID = igiPan then&#xA;  begin&#xA;    InertiaActiveChanged := False;&#xA;&#xA;    if not FInertiaActive and (gfBegin in EventInfo.Flags) then&#xA;    begin&#xA;      FInertiaActive := True;&#xA;      SendDebug(&#x27;Inertia starting&#x27;);&#xA;      InertiaActiveChanged := True;&#xA;    end;&#xA;&#xA;    if FInertiaActive and (gfEnd in EventInfo.Flags) then&#xA;    begin&#xA;      FInertiaActive := False;&#xA;      SendDebug(&#x27;Inertia stopping&#x27;);&#xA;      InertiaActiveChanged := True;&#xA;    end;&#xA;&#xA;    if not FInertiaActive and not InertiaActiveChanged then&#xA;    begin&#xA;      SendDebug(&#x27;Panning outside inertia&#x27;);&#xA;      Handled := True;&#xA;    end;&#xA;  end&#xA;  else&#xA;    SendDebug(IntToStr(EventInfo.GestureID) &#x2B; &#x27; &#x27; &#x2B; IntToStr(EventInfo.Location.Y));&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;When panning, the debug window shows the &amp;quot;Inertia starting&amp;quot; message and then the &amp;quot;Inertia stopping&amp;quot; message a few seconds later. If you initiate a second motion before the stop message, then &amp;quot;Panning outside inertia&amp;quot; is displayed and the grid won&#x27;t scroll.&lt;/p&gt;&#xA;&lt;p&gt;How can I make the grid scroll and respond to pan motions regardless of whether the inertia timer is active or not?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79888641</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">TVirtualStringTree: Tab key does not move to right cell in edit mode</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="tvirtualstringtree" />
        <author>
            <name>Mattia72</name>
            <uri>https://stackoverflow.com/users/2923283</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79888641/tvirtualstringtree-tab-key-does-not-move-to-right-cell-in-edit-mode" />
        <published>2026-02-13T09:35:00Z</published>
        <updated>2026-02-15T10:18:50Z</updated>
        <summary type="html">
            &lt;p&gt;As far as I know, for navigating between cells in edit mode, the standard approach in &lt;code&gt;TVirtualStringTree&lt;/code&gt; is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;kbd&gt;Tab&lt;/kbd&gt;: move to next cell&lt;/li&gt;&#xA;&lt;li&gt;&lt;kbd&gt;Shift&lt;/kbd&gt;&#x2B;&lt;kbd&gt;Tab&lt;/kbd&gt;: move to previous cell&lt;/li&gt;&#xA;&lt;li&gt;&lt;kbd&gt;Enter&lt;/kbd&gt;: end editing and move down&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;However, in my case &lt;kbd&gt;Tab&lt;/kbd&gt; always moves to the cell &lt;strong&gt;below&lt;/strong&gt;, not to the &lt;strong&gt;right&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;My current options:&lt;/p&gt;&#xA;&lt;h4&gt;DFM:&lt;/h4&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;TreeOptions.MiscOptions = [toAcceptOLEDrop, toCheckSupport, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick]&#xA;TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowTreeLines, toThemeAware, toUseBlendedImages]&#xA;TreeOptions.SelectionOptions = [toFullRowSelect]&#xA;TreeOptions.EditOptions = toHorizontalEdit&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4&gt;PAS:&lt;/h4&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;VstData.TreeOptions.SelectionOptions := VstData.TreeOptions.SelectionOptions &#x2B; [toFullRowSelect];&#xA;VstData.TreeOptions.MiscOptions := VstData.TreeOptions.MiscOptions &#x2B; [toGridExtensions, toEditable, toCheckSupport];&#xA;VstData.TreeOptions.EditOptions := toHorizontalEdit;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Is there an option I&#x2019;m missing to enable horizontal &lt;kbd&gt;Tab&lt;/kbd&gt; navigation? I&#x27;m using &lt;code&gt;TVirtualTree&lt;/code&gt; for VCL 2024.02.&lt;/p&gt;&#xA;&lt;h4&gt;EDIT&lt;/h4&gt;&#xA;&lt;p&gt;&lt;kbd&gt;Tab&lt;/kbd&gt; handling happens in &lt;code&gt;procedure TVTEdit.WMKeyDown(var Message : TWMKeyDown);&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;    VK_TAB :&#xA;      begin&#xA;        if Tree.IsEditing then&#xA;        begin&#xA;          Tree.InvalidateNode(FLink.Node);&#xA;          if ssShift in KeyDataToShiftState(Message.KeyData) then&#xA;            NextNode := Tree.GetPreviousVisible(FLink.Node, True)//Shift&#x2B;Tab goes to previous mode&#xA;          else&#xA;            NextNode := Tree.GetNextVisible(FLink.Node, True);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;As far as I see, columns are not considered. It seems the built&#x2011;in editor only navigates between nodes, not columns.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79887972</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">TDateTimePicker for months and years</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
        <author>
            <name>Limon</name>
            <uri>https://stackoverflow.com/users/9072807</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79887972/tdatetimepicker-for-months-and-years" />
        <published>2026-02-12T09:22:12Z</published>
        <updated>2026-02-16T19:14:09Z</updated>
        <summary type="html">
            &lt;p&gt;I have a need for a calendar that lets me select &lt;strong&gt;Periods&lt;/strong&gt;.&lt;br /&gt;&#xA;The constraints I&#x27;m facing are :&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;The Period has to be programatically selectable with a min and max Period that may change depending on the user actions.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;The Period doesn&#x27;t care about days or time ==&amp;gt; It&#x27;s &lt;strong&gt;only Months and Years&lt;/strong&gt; that we care about.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For that reason, I ended up using a TDateTimePicker as it lets you select precisely the maximum and minimum date for your Calendar.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;dtpPeriode.MaxDate:= StrToDate(Format(&#x27;%d/%d/%d&#x27;, [DaysInAMonth(Year, Month), Month, Year])).GetDate();&#xA;&#xA;dtpPeriode.MinDate:= StrToDate(Format(&#x27;01/%d/%d&#x27;, [Month, Year]));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The issue is on the second part, with the component itself.&lt;br /&gt;&#xA;When I click on it and the calendar drop downs, I get a &lt;strong&gt;selection of days&lt;/strong&gt; like so :&lt;br /&gt;&#xA;&lt;img src=&quot;https://i.sstatic.net/gw5fLeTI.png&quot; alt=&quot;Current behavior&quot; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;But when I click &lt;em&gt;&amp;quot;Janvier 2026&amp;quot;&lt;/em&gt; on top, I can access a selection of months :&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&quot;https://i.sstatic.net/MBhLIHpB.png&quot; alt=&quot;Default behavior I&#x27;m seeking&quot; /&gt;&lt;/p&gt;&#xA;&lt;p&gt;(There is only January because of my max-min as you can imagine)&lt;br /&gt;&#xA;And &lt;strong&gt;this is the visual I would like to have by default&lt;/strong&gt; without the user having to click anywhere.&lt;/p&gt;&#xA;&lt;p&gt;I&#x27;ve seen the &lt;em&gt;Perfom&lt;/em&gt; function but I&#x27;m not sure how to use it or what message to send.&lt;/p&gt;&#xA;&lt;p&gt;Also, I&#x27;m not set on using this component specifically but I&#x27;d rather not use third-party library for this and aside than this part, it does the job I want.&lt;/p&gt;&#xA;&lt;p&gt;Please let me know if any information lacks.&lt;/p&gt;&#xA;&lt;p&gt;Thank you for your help.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79887469</id>
        <re:rank scheme="https://stackoverflow.com">2</re:rank>
        <title type="text">Setting FILE_ATTRIBUTE_PINNED / UNPINNED makes file Hidden and System [closed]</title>
            <category scheme="https://stackoverflow.com/tags" term="windows" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="winapi" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-11-alexandria" />
        <author>
            <name>Seekr</name>
            <uri>https://stackoverflow.com/users/22423496</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79887469/setting-file-attribute-pinned-unpinned-makes-file-hidden-and-system" />
        <published>2026-02-11T14:36:52Z</published>
        <updated>2026-02-11T16:07:08Z</updated>
        <summary type="html">
            &lt;p&gt;I am using Delphi Alexandria (Win64) and I need to programmatically Pin and Unpin OneDrive files.&lt;/p&gt;&#xA;&lt;p&gt;I am attempting to use &lt;code&gt;GetFileAttributes()&lt;/code&gt; and &lt;code&gt;SetFileAttributes()&lt;/code&gt; with &lt;code&gt;FILE_ATTRIBUTE_PINNED&lt;/code&gt; and &lt;code&gt;FILE_ATTRIBUTE_UNPINNED&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;However, when I call &lt;code&gt;PinFile()&lt;/code&gt; or &lt;code&gt;UnpinFile()&lt;/code&gt;, the file unexpectedly becomes Hidden and System.&lt;/p&gt;&#xA;&lt;p&gt;Here is the code I am using:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;procedure PinFile(const FileName: string);&#xA;//PinFile(&#x27;C:\Users\Allan\OneDrive\Test.docx&#x27;);&#xA;const&#xA;  FILE_ATTRIBUTE_PINNED   = $00080000; // &#x2B;P&#xA;  FILE_ATTRIBUTE_UNPINNED = $00100000; // &#x2B;U&#xA;var&#xA;  Attr: DWORD;&#xA;begin&#xA;  Attr := GetFileAttributes(PChar(FileName));&#xA;  if Attr &amp;lt;&amp;gt; INVALID_FILE_ATTRIBUTES then&#xA;  begin&#xA;    // &#x2B;P  (pinIt)&#xA;    Attr := Attr and FILE_ATTRIBUTE_PINNED;&#xA;&#xA;    // -U  (set pinned / online-only)&#xA;    Attr := Attr or not FILE_ATTRIBUTE_UNPINNED;&#xA;&#xA;    if not SetFileAttributes(PChar(FileName), Attr) then&#xA;      RaiseLastOSError;&#xA;  end;&#xA;end;&#xA;&#xA;procedure UnpinFile(const FileName: string);&#xA;//UnpinFile(&#x27;C:\Users\Allan\OneDrive\Test.docx&#x27;);&#xA;const&#xA;  FILE_ATTRIBUTE_PINNED   = $00080000; // &#x2B;P&#xA;  FILE_ATTRIBUTE_UNPINNED = $00100000; // &#x2B;U&#xA;var&#xA;  Attr: DWORD;&#xA;begin&#xA;  Attr := GetFileAttributes(PChar(FileName));&#xA;  if Attr &amp;lt;&amp;gt; INVALID_FILE_ATTRIBUTES then&#xA;  begin&#xA;    // -P  (remove pinned)&#xA;    Attr := Attr and not FILE_ATTRIBUTE_PINNED;&#xA;&#xA;    // &#x2B;U  (set unpinned / online-only)&#xA;    Attr := Attr or FILE_ATTRIBUTE_UNPINNED;&#xA;&#xA;    if not SetFileAttributes(PChar(FileName), Attr) then&#xA;      RaiseLastOSError;&#xA;  end;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;What is the correct way to safely toggle these attributes without affecting other file attributes?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79885997</id>
        <re:rank scheme="https://stackoverflow.com">3</re:rank>
        <title type="text">Delphi FMX - How can I open the Android calendarpicker in darkmode</title>
            <category scheme="https://stackoverflow.com/tags" term="android" />
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="firemonkey" />
            <category scheme="https://stackoverflow.com/tags" term="firemonkey-style" />
        <author>
            <name>fisi-pjm</name>
            <uri>https://stackoverflow.com/users/9868828</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79885997/delphi-fmx-how-can-i-open-the-android-calendarpicker-in-darkmode" />
        <published>2026-02-09T16:05:25Z</published>
        <updated>2026-02-10T13:54:47Z</updated>
        <summary type="html">
            &lt;p&gt;I have created a little procedure with Delphi 13, to open the system CalendarPicker dialog on Android and was expecting to get that dialog in light mode when Android is in light mode, and in dark mode when Android is in dark mode. Unfortunately, it always shows in light mode. Any suggestions on what I might be doing wrong?&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;&#xA;uses &#xA;System.Sysutils, System.Classes, FMX.Platform,FMX.Pickers;&#xA;&#xA;...&#xA;&#xA;procedure OpenDatePicker;&#xA;var&#xA;  PickerService: IFMXPickerService;&#xA;  DateTimePicker: TCustomDateTimePicker;&#xA;begin&#xA;  if not TPlatformServices.Current.SupportsPlatformService(IFMXPickerService, PickerService) then&#xA;     raise Exception.Create(&#x27;Native pickers not supported on this platform&#x27;);&#xA;  DateTimePicker := PickerService.Create;&#xA;  DatePicker.Date := Now;&#xA;  DatePicker.ShowMode := TDatePickerShowMode.Date;&#xA;  DatePicker.Show;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79885089</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">Compile Error only in 64bit Delphi IDE: [dcc64 Fatal Error] F2084 Internal Error</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="compiler-errors" />
            <category scheme="https://stackoverflow.com/tags" term="delphi-13-florence" />
        <author>
            <name>Ian</name>
            <uri>https://stackoverflow.com/users/21344968</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79885089/compile-error-only-in-64bit-delphi-ide-dcc64-fatal-error-f2084-internal-error" />
        <published>2026-02-07T22:01:46Z</published>
        <updated>2026-02-07T22:58:55Z</updated>
        <summary type="html">
            &lt;p&gt;When I compile my app using the 64bit Delphi IDE, then I get errors like this:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;[dcc64 Fatal Error] F2084 Internal Error: AV7FF8AB8957FE(7FF8779F0000)-R1996FF0A004-0&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;[dcc64 Fatal Error] F2084 Internal Error: AV7FF8AB8957FE(7FF85F3B0000)-R1BFC5A1A004-0&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;But, when I compile using the 32bit IDE, then it works without any issues.&lt;/p&gt;&#xA;&lt;p&gt;Things I have tried and made sure of:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;p&gt;I have enough free RAM (3GB)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have restarted the IDE&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have restarted the Computer&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have changed File encoding from ANSI to UTF8&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have run a Clean on the project&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;p&gt;I have tried DEBUG and RELEASE&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;None of the above are working.&lt;/p&gt;&#xA;&lt;p&gt;I have a very simple project with only one main form and nothing else. I do not have any other units or forms or frames. Only one main form like you can see here:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.sstatic.net/cWYEUeGg.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.sstatic.net/cWYEUeGg.png&quot; alt=&quot;Delphi project&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I only have one component on my form and that is a &lt;code&gt;TPaintBox&lt;/code&gt;, which you can see here:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.sstatic.net/ykOLeth0.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.sstatic.net/ykOLeth0.png&quot; alt=&quot;Delphi form&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-none prettyprint-override&quot;&gt;&lt;code&gt;object frmMain: TfrmMain&#xA;  Left = 0&#xA;  Top = 0&#xA;  Caption = &#x27;First Contact Exterminaor Service Inc&#x27;&#xA;  ClientHeight = 178&#xA;  ClientWidth = 257&#xA;  WindowState = wsMaximized&#xA;  FormFactor.Width = 320&#xA;  FormFactor.Height = 480&#xA;  FormFactor.Devices = [Desktop]&#xA;  OnCreate = FormCreate&#xA;  OnDestroy = FormDestroy&#xA;  OnKeyDown = FormKeyDown&#xA;  OnKeyUp = FormKeyUp&#xA;  OnMouseDown = FormMouseDown&#xA;  OnMouseMove = FormMouseMove&#xA;  OnMouseUp = FormMouseUp&#xA;  DesignerMasterStyle = 0&#xA;  object PaintBox: TPaintBox&#xA;    Align = Client&#xA;    Size.Width = 257.00000000000000000&#xA;    Size.Height = 178.00000000000000000&#xA;    Size.PlatformDefault = False&#xA;    OnMouseDown = PaintBoxMouseDown&#xA;    OnMouseMove = PaintBoxMouseMove&#xA;    OnMouseUp = PaintBoxMouseUp&#xA;    OnPaint = PaintBoxPaint&#xA;  end&#xA;end&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This is my project file:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;program FirstContactExterminaorServiceInc;&#xA;&#xA;uses&#xA;  System.StartUpCopy,&#xA;  FMX.Forms,&#xA;  uMain in &#x27;uMain.pas&#x27; {frmMain};&#xA;&#xA;{$R *.res}&#xA;&#xA;begin&#xA;  Application.Initialize;&#xA;  Application.CreateForm(TfrmMain, frmMain);&#xA;  Application.Run;&#xA;end.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Any ideas or help?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79885041</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">How can I draw a square with a linear gradient fill inside a TPaintBox 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="tpaintbox" />
        <author>
            <name>Ryan Beveridge</name>
            <uri>https://stackoverflow.com/users/32331173</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79885041/how-can-i-draw-a-square-with-a-linear-gradient-fill-inside-a-tpaintbox-in-delphi" />
        <published>2026-02-07T20:03:23Z</published>
        <updated>2026-02-07T20:49:07Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x27;m trying to draw a simple square with a gradient fill using a &lt;code&gt;TPaintBox&lt;/code&gt; in Delphi FMX. I can draw shapes and solid colors without any issues, but I can&#x27;t figure out how to apply a gradient inside the square during the &lt;code&gt;OnPaint&lt;/code&gt; event.&lt;/p&gt;&#xA;&lt;p&gt;Here&#x2019;s the basic structure of what I have so far:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;procedure TForm1.PaintBox1Paint(Sender: TObject; Canvas: TCanvas);&#xA;begin&#xA;  Canvas.BeginScene;&#xA;  try&#xA;    // I need to draw square here with gradient fill&#xA;  finally&#xA;    Canvas.EndScene;&#xA;  end;&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;I&#x2019;m not sure how to correctly configure and apply them to a rectangle drawn manually on a &lt;code&gt;TPaintBox&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;What is the correct way to draw a square with a gradient fill inside a &lt;code&gt;TPaintBox&lt;/code&gt;?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79882929</id>
        <re:rank scheme="https://stackoverflow.com">1</re:rank>
        <title type="text">Scanlines gets wrong pixel colors</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="canvas" />
            <category scheme="https://stackoverflow.com/tags" term="drawing" />
            <category scheme="https://stackoverflow.com/tags" term="scanline" />
        <author>
            <name>stevenvh</name>
            <uri>https://stackoverflow.com/users/66056</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79882929/scanlines-gets-wrong-pixel-colors" />
        <published>2026-02-04T16:41:27Z</published>
        <updated>2026-02-04T19:11:59Z</updated>
        <summary type="html">
            &lt;p&gt;I&#x27;m working with this image:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.sstatic.net/itmSFfkj.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.sstatic.net/itmSFfkj.png&quot; alt=&quot;original image&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I have working code for drawing rectangles on it, which will be filled with the average color of said rectangles:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.sstatic.net/1Su8fS3L.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.sstatic.net/1Su8fS3L.png&quot; alt=&quot;after drawing on it&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is the code for drawing the rectangles:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;    procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState;&#xA;        X, Y: Integer);&#xA;    begin&#xA;        PenModeSave := Image1.Canvas.Pen.Mode;&#xA;        Image1.Canvas.Pen.Mode := pmNot;&#xA;        Image1.Canvas.Brush.Style := bsClear;&#xA;        MouseFirstPt := Point(X, Y);&#xA;        MouseLastPt := MouseFirstPt;&#xA;        Dragging := True;&#xA;    end;&#xA;&#xA;    procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);&#xA;    begin&#xA;        if Dragging then&#xA;        begin&#xA;            // erase previous rectangle&#xA;            Image1.Canvas.Rectangle(MouseFirstPt.X, MouseFirstPt.Y, MouseLastPt.X, MouseLastPt.Y);&#xA;            MouseLastPt := Point(X, Y);&#xA;            // draw new rectangle&#xA;            Image1.Canvas.Rectangle(MouseFirstPt.X, MouseFirstPt.Y, MouseLastPt.X, MouseLastPt.Y);&#xA;        end;&#xA;    end;&#xA;&#xA;    procedure TForm1.Image1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X,&#xA;        Y: Integer);&#xA;    var&#xA;        Rectangle: TRect;&#xA;    begin&#xA;        Dragging := False;&#xA;        MouseLastPt := Point(X, Y);&#xA;        Image1.Canvas.Pen.Mode := PenModeSave;&#xA;        Rectangle.TopLeft := MouseFirstPt;&#xA;        Rectangle.BottomRight := MouseLastPt;&#xA;        DrawAverageColor(Rectangle);&#xA;    end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This works. But when I try the function for averaging the colors programmatically (without the drawing with the mouse) I get the wrong colors, even when the rectangles&#x27; boundaries are OK:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&quot;https://i.sstatic.net/oTCs7tmA.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.sstatic.net/oTCs7tmA.png&quot; alt=&quot;after programmatically drawing&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The code:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;    procedure TForm1.BtnDrawMatrixClick(Sender: TObject);&#xA;    var&#xA;        X, Y: Integer;&#xA;        R: TRect;&#xA;    begin&#xA;        for Y := 1 to 15 do&#xA;            for X := 1 to 20 do&#xA;            begin&#xA;                R.TopLeft := Point(50 * X, 50 * Y);&#xA;                R.BottomRight := Point(50 * X &#x2B; 40, 50 * Y &#x2B; 40);&#xA;                DrawAverageColor(R);&#xA;            end;&#xA;    end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And here&#x27;s the code for calculating the average color and the drawing:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;    procedure TForm1.CalculateAverageColor(aRect: TRect; var aR, aG, aB: Integer);&#xA;    var&#xA;        X, Y, Area: Integer;&#xA;        R, G, B: Int64;&#xA;        Line : Prgb24Array;&#xA;    begin&#xA;        R := 0;&#xA;        G := 0;&#xA;        B := 0;&#xA;        for Y := aRect.Top to aRect.Bottom - 1 do&#xA;        begin&#xA;            Line := Image1.Picture.Bitmap.ScanLine[Y];&#xA;            for X := aRect.Left to aRect.Right - 1 do&#xA;            begin&#xA;                R := R &#x2B; Line[X].R;&#xA;                G := G &#x2B; Line[X].G;&#xA;                B := B &#x2B; Line[X].B;&#xA;            end;&#xA;        end;&#xA;        Area := Abs((aRect.Top - aRect.Bottom &#x2B; 1) * (aRect.Left - aRect.Right &#x2B; 1));&#xA;        aR := Round(R / Area) and $FF;&#xA;        aG := Round(G / Area) and $FF;&#xA;        aB := Round(B / Area) and $FF;&#xA;    end;&#xA;&#xA;    procedure TForm1.DrawAverageColor(aRect: TRect);&#xA;    var&#xA;        X, Y, R, G, B: Integer;&#xA;        Line : Prgb24Array;&#xA;    begin&#xA;        CalculateAverageColor(aRect, R, G, B);&#xA;        for Y := aRect.Top to aRect.Bottom - 1 do&#xA;        begin&#xA;            Line := Image1.Picture.Bitmap.ScanLine[Y];&#xA;            for X := aRect.Left to aRect.Right - 1 do&#xA;            begin&#xA;                Line[X].R := R;&#xA;                Line[X].G := G;&#xA;                Line[X].B := B;&#xA;            end;&#xA;        end;&#xA;        Image1.Refresh;&#xA;    end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Prgb24Array definition:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;    type&#xA;        Trgb24 = packed record&#xA;            B, G, R: Byte;&#xA;        end;&#xA;        Trgb24Array = packed array[0..High(Word) div SizeOf(Trgb24)-1] of Trgb24;&#xA;        Prgb24Array = ^Trgb24Array;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;When I remove the lines &amp;quot;erase previous rectangle&amp;quot; and &amp;quot;draw new rectangle&amp;quot; I also get the wrong colors.&lt;br /&gt;&#xA;What&#x27;s happening here?&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79881392</id>
        <re:rank scheme="https://stackoverflow.com">5</re:rank>
        <title type="text">How to correctly return from a x64 assembly procedure when .PARAMS is used?</title>
            <category scheme="https://stackoverflow.com/tags" term="windows" />
            <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" />
            <category scheme="https://stackoverflow.com/tags" term="64-bit" />
        <author>
            <name>&#x410;&#x43B;&#x435;&#x43A;&#x441;&#x430;&#x43D;&#x434;&#x440; &#x41A;&#x443;&#x43B;&#x430;&#x433;&#x438;&#x43D;</name>
            <uri>https://stackoverflow.com/users/14181716</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79881392/how-to-correctly-return-from-a-x64-assembly-procedure-when-params-is-used" />
        <published>2026-02-02T19:51:37Z</published>
        <updated>2026-02-05T10:38:12Z</updated>
        <summary type="html">
            &lt;p&gt;Suppose I have a procedure like this:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;procedure DoSomething;&#xA;asm&#xA;  .PARAMS 11 // This will auto-generate &amp;quot;push rbp &#x2B; sub rsp,$60 &#x2B; mov rbp,rsp&amp;quot;&#xA;  // ...&#xA;end;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Suppose I need to return from it in the middle of things. Like &amp;quot;&lt;code&gt;if CheckFailed then Exit;&lt;/code&gt;&amp;quot;. How do I do this correctly? Obviosly, the simple &lt;code&gt;ret&lt;/code&gt; will not work correctly.&lt;/p&gt;&#xA;&lt;p&gt;I can hard-code it as:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;lea rsp,[rbp&#x2B;$60]&#xA;pop rbp&#xA;ret&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Is there a better way? I mean: what is the purpose of &lt;code&gt;.PARAMS&lt;/code&gt;, if I can just write &lt;code&gt;push&lt;/code&gt;/&lt;code&gt;pop&lt;/code&gt; directly?&lt;/p&gt;&#xA;&lt;p&gt;And if &lt;code&gt;.PARAMS&lt;/code&gt; is necessary/required, how do I know the offset for the &lt;code&gt;lea rsp,[rbp&#x2B;???]&lt;/code&gt; instruction?&lt;/p&gt;&#xA;&lt;p&gt;The mentioned $60 offset is highly dependent on the compiler and &lt;strong&gt;actual code in routine&lt;/strong&gt;. For example, even the latest IDE reserves &#x2B;1 additional parameter. In other words: if you have &lt;code&gt;.PARAMS 7&lt;/code&gt; - the compiler will reserve space for 8 params. What is worse: older IDE have some sort of a bug. If you write simple code, old compiler will reserve space for 8 params. However, if you reference &lt;code&gt;@PARAMS&lt;/code&gt; anywhere in your code - old compiler will reserve space for 10 (!) params, while latest compiler will not change anything. This looks like a bug similar to x86-32: if you use a label in your assembly code - old compiler will generate a frame, while new compiler will not.&lt;/p&gt;&#xA;
        </summary>
    </entry>
    <entry>
        <id>https://stackoverflow.com/q/79881346</id>
        <re:rank scheme="https://stackoverflow.com">0</re:rank>
        <title type="text">Redemption GetFreeBusy fails with Office 365 (HTTP 401 Autodiscover) in 64-bit Delphi app</title>
            <category scheme="https://stackoverflow.com/tags" term="delphi" />
            <category scheme="https://stackoverflow.com/tags" term="outlook" />
            <category scheme="https://stackoverflow.com/tags" term="office365" />
            <category scheme="https://stackoverflow.com/tags" term="mapi" />
            <category scheme="https://stackoverflow.com/tags" term="outlook-redemption" />
        <author>
            <name>jqbd</name>
            <uri>https://stackoverflow.com/users/23687521</uri>
        </author>
        <link rel="alternate" href="https://stackoverflow.com/questions/79881346/redemption-getfreebusy-fails-with-office-365-http-401-autodiscover-in-64-bit-d" />
        <published>2026-02-02T18:07:12Z</published>
        <updated>2026-02-03T20:30:38Z</updated>
        <summary type="html">
            &lt;p&gt;I have a 64-bit Delphi application using Redemption 5.27 (64-bit) to retrieve Outlook Free/Busy information.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Environment:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Office 365 (64-bit Outlook)&lt;/li&gt;&#xA;&lt;li&gt;Redemption 5.27 (64-bit)&lt;/li&gt;&#xA;&lt;li&gt;Outlook running with a logged-on profile&lt;/li&gt;&#xA;&lt;li&gt;Retrieving Free/Busy for the current user&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&#xA;AddressEntry.GetFreeBusy fails with:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;HTTP error 401 from &lt;a href=&quot;https://outlook.office365.com/autodiscover/autodiscover.xml&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://outlook.office365.com/autodiscover/autodiscover.xml&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Minimal reproducible sample:&lt;/p&gt;&#xA;&lt;pre class=&quot;lang-pascal prettyprint-override&quot;&gt;&lt;code&gt;RDOSession := CoRDOSession.Create;&#xA;RDOSession.Logon(&#x27;&#x27;, &#x27;&#x27;, False, False, 0, True);&#xA;&#xA;AddressEntry := RDOSession.AddressBook.ResolveName(&#x27;email@company.com&#x27;, False, 0);&#xA;if AddressEntry &amp;lt;&amp;gt; nil then&#xA;  AddressEntry.GetFreeBusy(Today, 30, True);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;ResolveName works&lt;/li&gt;&#xA;&lt;li&gt;GetFreeBusy throws the 401 error&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Additional info:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Retrieving Free/Busy via the Outlook Object Model&#xA;(Recipient.FreeBusy) works on the same machine/profile.&lt;/li&gt;&#xA;&lt;li&gt;The issue appears specific to Redemption&#x2019;s GetFreeBusy path.&lt;/li&gt;&#xA;&lt;li&gt;I have also tried Redemption 6.6 and this fails with the same 401 error&lt;/li&gt;&#xA;&lt;li&gt;The above code previously worked when everything was 32 bit using standard Outlook rather 365.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Questions:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Should AddressEntry.GetFreeBusy work with Office 365 / Exchange Online?&lt;/li&gt;&#xA;&lt;li&gt;Does Redemption require OAuth or any special configuration for Free/Busy in this scenario?&lt;/li&gt;&#xA;&lt;li&gt;Is there a recommended approach for Free/Busy retrieval with Exchange Online using Redemption?&lt;/li&gt;&#xA;&lt;li&gt;Is there a way my application could remain 32 bit and still be able to retrieve free busy? We have claims of people actually running our 32 bit app and being able to retrieve free busy but have no idea how or if they have really achieved this. For me, redemption fails to load due to outlook bitness not matching.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;
        </summary>
    </entry>
</feed>