Styles: CPU usage when idle


I am using the Office 2019 styles in my application and noticed that on some machines the fan starts very quickly when running the application. Checked a bit more by just starting the application and doing nothing, i.e. idle mode.

CPU usage on a dual core system (virtual machine) is between 5% and 12% constantly, no animations or background tasks in the application. Verified this with the sample UOffice2019DemoApplication. The latter I cannot profile, but in my application I can see with line timer that 100% is used in AdvStyleIF.pas:

Line Total Time   Source
539               procedure TRegMonitorThread.Execute;
540               var
541                 i: integer;
542  0,000000     begin
543                 InitThread;
545 0,000000        while not Terminated do
546                 begin
547 70247,216940      if WaitForSingleObject(FEvent, INFINITE) = WAIT_OBJECT_0 then

So, WaitForSingleObject causes this when idle. Is there a way to reduce it by some options or similar? Having a howling fan on low spec machines is quickly annoying for some people.

Thanks! Matthias

I have retested this here and when using AdvFormStyler.AutoThemeAdapt = true (which is what using this monitor thread) I see 0% CPU usage.
Can you compare your application with one of our demos to see if this happens in our demos too, as we cannot see this here.

I turned off any AutoThemeAdapt I could grep-find (app, form, menu, preview menu, toolbar, statusbar), this is much better now!

Could not find any description for this option in the manual - is there anything I have to take care of "manually" now with this turned off? I have all styler fields I could find on my forms, frames etc. linked to an appStyler on a central data module, looks like this takes care of everything so far... though a disabled action causes one button to look odd (no transparent background, and image is with border now) - but that I will look at tomorrow likely.


Seems the inactive button under any Office 2019 styling is wrong since I updated to latest UI Pack dated March 3rd; I updated before testing the autoThemeAdapt to make sure the office demo was unchanged.

I noticed some components improved under 2019 style, but potentially the inactive setting is broken? This is still picking from the disabled images list, but the background is not the office white/gray/black, but a chrome horizon style...

  1. AutoThemeAdapt means that at application startup, it looks at Windows / Office theme settings and synchronizes with it and that it monitors the registry for changes in Windows / Office theme and then also adapts at runtime.
    2) Do you have more details on the inactive state? What exact issue do you see?

A check is very straight forward:

Just open the TMS Office2019 sample application, at design time set AdvGlowButton3.Enabled to false ("Paste" button), and for runtime check add the following to procedure TForm6.AddPlannerItems:

AdvGlowButton12.Enabled := False;

When you run it you see that the disabled style is surely not Office2019, it is more like a chrome effect or similar.

We could find this issue and we have fixed this. Next update will address this.