FMXInno

DLL FMXInno October 27, 2024

Нет прав для скачивания

tihiy_don

Старожил
tihiy_don обновил(а) ресурс FMXInno новой записью:

2023-Oct-10

1. Added new classes:
- FTreeView
- FTreeViewItem
- FMenuBar
- FMenuBarItem

2. FCheckboxTree - Removed the following properties:
- procedure Selectable(FEnable: Boolean)
- procedure RemoveBckgnd

3. Added some new functions.

4. Some improvements:
- TitleBar
- FForm

5. Bug Fixing:
- If someone experiences flickering when switching between dark mode and light mode,
it has now been fixed.
- Added some missing properties.
- Made some improvements.
Узнать больше об этом обновлении...
 

BLACKFIRE69

Новичок
Some of the FMXInno fans have been asking me how to use emojis in FMXInno. Here's a common answer for all of them:

FMXInno includes a built-in function called 'CnvtUTF32ToUTF16,' which you can use to achieve this.


(a) Case-I

1. Find the Unicode value of the corresponding emoji.

00.png

2. Place that value in the 'CnvtUTF32ToUTF16' function.
- Don't forget the 'U+' part.

Ex: AText[1].Text('Wow ' + CnvtUTF32ToUTF16('U+1F525'));

00A.png


(b) Case-II

1. In case you couldn't find the corresponding Unicode value for the emoji, copy the emoji to an online converter and convert it to hexadecimal.

01.png

2. Take the resulting value and put it in the 'CnvtUTF32ToUTF16' function.
- Don't forget the 'U+' part.

Ex: AText[1].Text('Text ' + CnvtUTF32ToUTF16('U+274E'));

01A.png


(c) Case-III

1. If you need more than one emoji, you can use multiple Unicode values in the same 'CnvtUTF32ToUTF16' function with comma separation.
- Don't forget the 'U+' part.

Ex: AText[1].Text('Tonight ' + CnvtUTF32ToUTF16('U+1F48B, U+1F60B, U+1F6AC'));

02A.png



(d) Case-IV


1. Some emojis may have multiple Unicode values. Use the same technique as in Case-III and separate them with commas.
- Don't forget the 'U+' part.

Ex: AText[1].Text('Text ' + CnvtUTF32ToUTF16('U+28, U+3065, U+FF61, U+25D5, U+203F, U+203F, U+25D5, U+FF61, U+29, U+3065'));

03.png03A.png




Refer to the attached example for more.

x.png
 

Вложения

BLACKFIRE69

Новичок
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.

0.png1.png


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 .


3.jpg4.png



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 );





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:

win11-0.pngwin11-1.png



Windows 10:

win10-2.png


Windows 7:

win7-0.png



.
 
Последнее редактирование:

Masquerade

Новичок
Hi,
I've been having an issue recently where the font will not apply to the installer and the installer will not close properly (when cancel or close is pressed, the window will infinitely hang).

The font issue is strange as the code ought to be correct:



I believe the installer hang is caused due to the deinitialise font code (as no font is loaded). I have tried moving the code loading the font above and below the FMXInnoInit; line.

Hopefully someone may suggest a fix!
 

BLACKFIRE69

Новичок
Hi,
I've been having an issue recently where the font will not apply to the installer and the installer will not close properly (when cancel or close is pressed, the window will infinitely hang).

The font issue is strange as the code ought to be correct:



I believe the installer hang is caused due to the deinitialise font code (as no font is loaded). I have tried moving the code loading the font above and below the FMXInnoInit; line.

Hopefully someone may suggest a fix!



@Masquerade
this procedure is recommended for applying new fonts.

Форматирование (BB-код):
function InitializeSetup(): Boolean;
begin
{ Font }
  InstallFMXFont(ExtractAndLoad('{#MyFont1}'));  // or  ExtractTemporaryFile('MyFont1.ttf')  and  load 
  InstallFMXFont(ExtractAndLoad('{#MyFont2}'));  // or  ExtractTemporaryFile('MyFont2.ttf')  and  load 
{ Font }

  FMXInnoInit;

  Result := True;
end;
Форматирование (BB-код):
procedure DeinitializeSetup();
begin
{ Font }
  DeleteFMXFont(ExpandConstant('{tmp}\{#MyFont1}'));
  DeleteFMXFont(ExpandConstant('{tmp}\{#MyFont2}'));
{ Font }

  FMXInnoShutDown;
end;
Форматирование (BB-код):
procedure FMXDesigning;
begin
  { FMX Blank Form }
  FMXForm.FCreateBlankForm(WizardForm.Handle, ALCrimson, '');
  FMXForm.SetCursor(ExtractAndLoad('Dark2.ani'));
    // Font
  InvalidateFMXFont;

....
end;

1k.png
 
Последнее редактирование:

Masquerade

Новичок
Alright, so I changed the code as recommended above yet the font file is not loading correctly. The code for FMXDesigning and DeinitializeSetup was already present.
 

audiofeel

Старожил
Alright, so I changed the code as recommended above yet the font file is not loading correctly. The code for FMXDesigning and DeinitializeSetup was already present.
56.png
I have no problems with loading fonts (I understand that this does not mean that other users have no problems). Maybe the problem is that the font is originally ".otf". Try replacing with ".ttf"
The font name will change from
Форматирование (BB-код):
#define FontName1     "Exo 2.0 Medium"
to
Форматирование (BB-код):
#define FontName1     "Exo 2 Medium"
 

Вложения

Последнее редактирование:

BLACKFIRE69

Новичок
Alright, so I changed the code as recommended above yet the font file is not loading correctly. The code for FMXDesigning and DeinitializeSetup was already present.



@Masquerade
everything is working fine; the issue might be with the font name you used.

Форматирование (BB-код):
// Font
#define MyFont1 "FONT.OTF"           
#define MyFont1Name "Exo 2.0 Medium"
// Font
1k.png
 

Вложения

tihiy_don

Старожил
tihiy_don обновил(а) ресурс FMXInno новой записью:

2023-Nov-13

* Added new functions:
-- function wGetRecycleBinInfo(ARootPath: WideString; var TotalSizeMB: Extended; var FileCount: Integer): Boolean;
-- function wCopyToClipboard(const AStr: WideString): Boolean;
-- function wPasteFromClipboard: WideString;

* Updated FForm class.

* Updated FluentApi (Internal + External).
-- Make sure to update your current scripts as follows:

function EnableFluent(const WinHandle: HWND; DarkTheme, NoBorders, NoTitleBar: Boolean; Opacity: Single...
Узнать больше об этом обновлении...
 

BLACKFIRE69

Новичок
FluentApi - [2023-Nov-13]

1. Improved to work smoothly on every system [Win 7, 8, 8.1, 10 and 11].

-- New Filesize without any PE compressor: (65 KB -->) 34.5 KB

2. 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

db1.pngdb2.png




3. Added new functions.

a. 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.


00.gif


b. function IsWinDarkModeEnabled: Boolean;
c. function IsWinTransparencyEnabled: Boolean;
d. function GetWinAccentColorVCL: TColor;
e. function EnableWinTransparency(Enabled: Boolean): Boolean;


4. Now FluentApi supports 100% for Windows 7.

w70.pngw71.pngw72.pngw73.png
 

Вложения

BLACKFIRE69

Новичок
why the FMXInno don't work in the UninstallProgressForm.
Код:
procedure EmptyUninstallForm(const Buttons: Boolean; Const iWidth, iHeight: Integer);
begin
  with UninstallProgressForm do
  begin
    Position:= poDesktopCenter;
    BorderStyle:= bsNone;
    OuterNotebook.Hide;
    InnerNotebook.Hide;
    if iWidth <> 0 then Width:= iWidth;
    if iHeight <> 0 then Height:= iHeight;
    if Buttons then begin
      CancelButton.SetBounds(0,0,0,0);
      Bevel.SetBounds(0,0,0,0);
    end;
  end;
end;
Код:
[Setup]
AppName=Setup
AppVersion=1.0.0
DefaultDirName=Setup
DefaultGroupName=Setup

[Files]
Source: "Modules\FMXInno.dll"; Flags: dontcopy
Source: "Modules\FMXInno.dll"; DestDir: {app}\Uninstall

[Code]
#include "Modules\FMXInnoHandle.iss"

var
  WForm, UForm: FForm;
  WButton, UButton: FButton;

procedure WOnClick(Sender: TObject);
begin
  WizardForm.NextButton.OnClick(Sender);
end;

function InitializeSetup: Boolean;
begin
  Result:= True;
end;
                              
procedure InitializeWizard;
begin
  EmptyWizardForm(True, 854, 520);

  WForm:= InitFormHandle;

  WForm.FCreateBlankForm(WizardForm.Handle, ALBlack, '');
  WForm.CanvasQuality(cqHighQuality);

  WButton:= InitButtonHandle;

  WButton.FCreate(WForm.Handle);
  WButton.Left(10);
  WButton.Top(10);
  WButton.Height(28);
  WButton.Width(80);
  WButton.Text('Install');
  WButton.OnClick(@WOnClick);

  WForm.Show;
end;

procedure UOnClick(Sender: TObject);
begin

end;

function InitializeUninstall: Boolean;
begin
  FileCopy(ExpandConstant('{app}\Uninstall\FMXInno.dll'), ExpandConstant('{tmp}\FMXInno.dll'), False);
  Result:= True;
end;

procedure InitializeUninstallProgressForm;
begin
  EmptyUninstallForm(True, 854, 520);

  UForm:= InitFormHandle;

  UForm.FCreateBlankForm(UninstallProgressForm.Handle, ALBlack, '');
  UForm.CanvasQuality(cqHighQuality);

  UButton:= InitButtonHandle;

  UButton.FCreate(UForm.Handle);
  UButton.Left(10);
  UButton.Top(10);
  UButton.Height(28);
  UButton.Width(80);
  UButton.Text('Uninstall');
  UButton.OnClick(@UOnClick);

  UForm.Show;
end;

procedure DeinitializeSetup;
begin
  ISArcExCleanUp;
  FMXInnoShutDown;
end;



this is not the right way to do this.


FMXInno-UninstallForm:

i.
you can certainly use FMXInno for the UninstallForm, but the procedure is a little bit different than the InstallForm.

ii. the reason i didn't talk much about the 'UninstallForm' is that it's extra work, and users may be confused by it. on the other hand, 'FluentApi.dll' is easy to use.

iii. but if you need, i can show you an example of how to use FMXInno on the UninstallForm in InnoSetup. check out the following example.

>> you can synchronize the progress with the 'UninstallForm' progress bar by following the '1_Original_Inno_Example-mod.iss' example. if you need help, feel free to ask.


00.gif



Download:



>> I'll upload the full package of the latest version of FMXInno (build Dec-01) here soon since 'FileForums.com' is currently down.
 

tihiy_don

Старожил
Было бы неплохо, я бы сразу обновил ресурс на последнюю версию со всеми примерами.
 

BLACKFIRE69

Новичок
FMXInno [Build 2023-Dec-09] - Full Package


Including:

1. All the examples.
2. All the External Libraries + Tools.
3. FMXInno + SKIA blueprints.
4. FMXInno + Blend2D blueprints.
5. FMXInno + Botva2-Like blueprints.
6. InnoSetup v5.6.1 Repack with Restools IDE.

(*Blueprints == Custom Components)


What's new:

1.
Some improvements and bug fixing related to RadStudio 12.
2. Fixed some memory leaks.
3. Updated 'Speech and Voice-Recognition'.
4. Updated 'FInstNewProc'.


Notice:

1.
The following things have already been integrated into FMXInno.

1). SKIA - Google SKIA Graphic Library.
2). Blend2D - 2D Vector Graphic Engine.
3). Image32 - 2D graphics library.
4). Lua - Delphi binding for Lua 5.1.
5). Python - Wrap up the Python DLL into Delphi.

But by default, 'Image32', 'Lua', and 'Python' support have been disabled because i think that is too much for general users to have.
if someone is interested in full feature support, let me know.


00.gif

2. Please note that some methods have been renamed.
( function GetYesBtnObject: Longint; ==> function GetObjectYesBtn: Longint; )


Extra:

1.
Updated 'FXPacker v2.0'.
-- Now Debug Mode is available on GUI.

a. If Debug Mode is enabled, the only thing you need to allocate data (Images, etc.) from the archive (Setup.dat) is the password. 'Setup Exe' is no longer needed.
b. This means you can modify and compile the current script anytime without creating a new archive (Setup.dat).


x.pngy.png


2. Updated '1_Original_Inno_Example-mod.iss' example.


0.png1.png2.png3.png4.png



Vision 2025:

1.
Adding AI features, including generating Images, Audio/Sound, etc.
2. Including an AI Co-Pilot/Assistant.

( Why AI everywhere? Because AI is the future. If we cannot adapt to the changing environment, it'll cause us to become extinct. )
( Does Google's "Gemini" lie is also the future? )


Download:

[ Future FMXInno official updates and new feature reveals will only be available at 'FileForums.com' in its original post.
(Let's hope 'FileForums.com' will be back to work). If 'FileForums.com' is continuously down, I will let you know where you can download them.
]


 
Сверху