Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 15-11-2023, 17:35
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 668
Thanks: 471
Thanked 2,374 Times in 542 Posts
BLACKFIRE69 is on a distinguished road
Talking Windows Fluent Effects Standalone API - InnoSetup / VCL / FXM

Windows Fluent Effects Standalone API

Code:
Module: FluentApi.dll
Version: v2.0.0.1
Author : BLACKFIRE69
FileSize: 34.5 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.


>> Double Buffered:

For Inno/VCL, it's important to enable double buffering for forms before using fluent effects.
However, the original version of InnoSetup doesn't support double buffering natively but requires the enhanced edition.
Therefore, I have provided you with two DLLs that enable double buffering for forms in InnoSetup.

If you know a better way to achieve this, let me know, as in this case, 'WS_EX_COMPOSITED' does not work.

IS5Extra.dll ==> for InnoSetup 5.x
IS6Extra.dll ==> for InnoSetup 6.x






>> procedure FluentSetActiveThemeModeAwareness(const FluentHandle: Integer; FValue: Boolean);

In simple terms, if you change the system mode (dark/light) while the app is running,
the app will automatically change its mode (dark/light) to match the system mode.
However, this feature does not work for custom-colored fluent forms and is supported only on Win10 and Win11.





Code:
{ 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;

type
  TSysModeOnChanged = procedure(const ISDarkMode: Boolean);

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 FluentSetActiveThemeModeAwareness(const FluentHandle: Integer; FValue: Boolean; ThemeOnChanged: TSysModeOnChanged);
procedure FluentWin10RedrawOnUpdate(const FluentHandle: Integer; FValue: Boolean);
procedure FluentDisableOnDeactive(const FluentHandle: Integer; const FDisable: Boolean);  (* For Windows 11 Only*)
procedure FluentShutdown(const FluentHandle: Integer);

// Extra:
function IsWinDarkModeEnabled: Boolean;
function IsWinTransparencyEnabled: Boolean;
function GetWinAccentColorVCL: TColor;
function EnableWinTransparency(Enabled: Boolean): Boolean;
.
Attached Images
File Type: png w00.png (55.8 KB, 115 views)
File Type: png w01.png (35.1 KB, 110 views)
File Type: png w02.png (50.4 KB, 116 views)
File Type: png w03.png (58.6 KB, 113 views)
File Type: png w70.png (64.2 KB, 116 views)
File Type: png w71.png (38.7 KB, 114 views)
File Type: png w72.png (59.7 KB, 113 views)
File Type: png w73.png (72.4 KB, 111 views)
Attached Files
File Type: rar FLuentApi + Examples [2023-Nov-13].rar (787.7 KB, 30 views)

Last edited by BLACKFIRE69; 15-11-2023 at 17:44.
Reply With Quote
The Following 7 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (30-11-2023), audiofeel (15-11-2023), Cesar82 (16-11-2023), hitman797 (15-11-2023), Lord.Freddy (15-11-2023), nordi (24-02-2024), Razor12911 (15-11-2023)
Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FMXInno - Windows Fluent Design Installer UI for Inno BLACKFIRE69 Conversion Tutorials 865 16-09-2024 12:06
Windows Taskbar Plugin for InnoSetup BLACKFIRE69 Conversion Tutorials 1 13-03-2023 05:55
Windows XP - Tricks gargujjwal Software 3 25-05-2008 02:54
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 09:48



All times are GMT -7. The time now is 08:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com