FMXInno Build - 2023-Nov-06
As we are aware, Windows 10 can exhibit performance
issues with FMXInno forms' Fluent effects (acrylic), causing a lag when dragging a form.
However, in Windows 11, these effects work smoothly, because it's capable of doing that from scratch.
Until now, finding a solution for the lag issue on Windows 10 has proven challenging.
What I've done is, manually switch the
form's acrylic effects to
semi-transparent when form dragging
begins,
and then
revert to
acrylic after dragging
stops. This trick eliminates the lag,
but it comes with a side effect: the form
loses its
border and
drop-shadow , which can be less visually appealing.
To address this side effect, I explored various solutions and found that
redrawing the form after
the (acrylic <==> semi-transparent) transition
restores the
border and
drop-shadow.
However, this approach introduces a
minor flickering issue during redrawing.
So, I'm leaving the decision to you: whether to redraw the form to regain the border and drop-shadow after dragging in Windows 10.
I've also added a
new method, '
Win10FluentRedrawOnUpdate(FValue: Boolean)', under the '
FForm' class.
Enabling '
Win10FluentRedrawOnUpdate ' will also make '
PauseFluentEffectsOnDeactivate ' work on
Windows 10 .
Despite FMXInno's initial
design for
Windows 11, after a few modifications and with the
new FluentApi v2.0,
it now supports multiple Windows systems, including
Windows 7, 8/8.1, 10-*, and 11-*.
However, ensuring all features work seamlessly across these systems can be
challenging, and it may
not be entirely
possible.
Note:
I have been working on adding support for
higher DPI in FMXInno
without the need for
NewScaler (NSX, NSY, ...).
This has been an ongoing effort in previous builds, and now it's time to
test it .
With this build, you should be able to use FMXInno at higher DPI values without NewScaler.
Please provide your feedback on this.
If you prefer to continue using NewScaler, that's perfectly fine because NewScaler is
still functional.
~ Before (On Higher DPI):
AText.SetBounds( NSX(40), NSY(60), NSX(240), NSY(38) );
~ Now (On Higher DPI):
AText.SetBounds( 40, 60, 240, 38 );
app.box.com
Windows Fluent Effects Standalone API
Module: FluentApi.dll
Version: v2.0.0.1
Author : BLACKFIRE69
FileSize: 63 KB
Support: Windows 7, 8, 8.1, 10 and 11.
Compiler : RadStudio 11 Update 3 + Patch 01
With the FluentApi.dll standalone API, you can experiment with Fluent effects in your applications
without using FMXInno.
It functions similarly to FMXInno but comes with some
limitations.
Here are examples of how to use FluentApi.dll in:
1.
InnoSetup
2.
VCL - Delphi
3.
FMX - Delphi
NOTE:
1. Change the form fill color to
Null.
2. Enable
DoubleBuffered for
InnoSetup /
VCL ( It
requires Inno Setup Enhanced Edition for that. ).
3. On
Windows 7 , FluentApi
may not work with
InnoSetup and
VCL , but it works fine with
FMX .
Форматирование (BB-код):
{ FluentType }
const
FLUENT_DISABLE = $0000;
FLUENT_OPAQUE = $0001; //Windows 8/8.1
FLUENT_TRANSPARENT = $0002; //Windows 10/11
FLUENT_BLUR = $0003; //Windows 10/11
FLUENT_ACRYLIC = $0004; //Windows 10/11
FLUENT_INVALID_STATE = $0005;
function EnableFluent(const WinHandle: HWND; DarkTheme, NoBorders, NoTitleBar: Boolean; Opacity: Single; BrightnessPct: Byte): Integer;
(*Return Value = FluentHandle*)
function EnableFluentEx(const WinHandle: HWND; VCLColor: Integer; NoBorders, NoTitleBar: Boolean; Opacity: Single; BrightnessPct: Byte): Integer;
(*Return Value = FluentHandle*)
function EnableFluentNull(const WinHandle: HWND; NoBorders, NoTitleBar: Boolean): Integer;
(*Return Value = FluentHandle*)
procedure FluentChangeToDarkMode(const FluentHandle: Integer; FDarkMode: Boolean);
procedure FluentChangeColor(const FluentHandle, VCLColor: Integer);
procedure FluentChangeType(const FluentHandle, FluentType: Integer);
procedure FluentSuspend(const FluentHandle: Integer);
procedure FluentResume(const FluentHandle: Integer);
procedure FluentWin10RedrawOnUpdate(const FluentHandle: Integer; FValue: Boolean);
procedure FluentDisableOnDeactive(const FluentHandle: Integer; const FDisable: Boolean); (*For Windows 11 Only*)
procedure FluentShutdown(const FluentHandle: Integer);
Windows 11:
Windows 10:
Windows 7:
app.box.com
.