FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   FMXInno - Windows Fluent Design Installer UI for Inno (https://fileforums.com/showthread.php?t=104852)

hitman797 31-08-2023 08:46

Quote:

Originally Posted by Fak Eid (Post 502218)
5. Is there a way to bring the Video file in the background and display text over it?

use FTabControl
Code:

  // TabControl
type
  FTabControl = interface(IUnknown)
    '{4E174B91-AFAC-42FC-A740-450E6F17B9B3}'
    function FCreate(FParent: TFmxObject): ITabControl;
    procedure SetBounds(FLeft, FTop, FWidth, FHeight: Single);
    procedure HitTest(FValue: Boolean);
    procedure SetActiveTabWithTransition(const ATab: ITabItem; const ATransition: TTabTransition; const ADirection: TTabTransitionDirection);
    procedure SetActiveTabWithTransitionAsync(const ATab: ITabItem; const ATransition: TTabTransition; const ADirection: TTabTransitionDirection; const AOnFinish: TNotifyEvent);
    procedure FinishCurrentTabTransition;
    function FindVisibleTab(var Index: Integer; const FindKind: TFindKind): Boolean;
    function FindVisibleTab2(const FindKind: TFindKind): Integer;
    procedure GoToActiveTab;
    function GotoVisibleTab(Index: Integer; ATransition: TTabTransition; const ADirection: TTabTransitionDirection): Boolean;
    function Next(ATransition: TTabTransition; const ADirection: TTabTransitionDirection): Boolean;
    function Previous(ATransition: TTabTransition; const ADirection: TTabTransitionDirection): Boolean;
    function First(ATransition: TTabTransition; const ADirection: TTabTransitionDirection): Boolean;
    function Last(ATransition: TTabTransition; const ADirection: TTabTransitionDirection): Boolean;
    function Delete(const Index: Integer): Boolean;
    function HasActiveTab: Boolean;
    procedure UpdateTabBarButtons;
    function TabCount: Integer;
    function TransitionRunning: Boolean;
    procedure Align(FAlign: TAlignLayout);
    function ActiveTab: ITabItem;
    function ActiveTabIndex: Integer;
    function GetTabItem(AIndex: Integer): ITabItem;
    procedure Enabled(FEnabled: Boolean);
    procedure CanFocus(FValue: Boolean);
    procedure Height(FHeight: Single);
    procedure Margins(FLeft, FTop, FRight, FBottom: Single);
    procedure Padding(FLeft, FTop, FRight, FBottom: Single);
    procedure Opacity(FOpacity: Single);
    procedure Position(X, Y: Single);
    procedure RotationAngle(FAngle: Single);
    procedure Scale(X, Y: Single);
    procedure TabHeight(FHeight: Single);
    procedure TabStop(FValue: Boolean);
    procedure TabPosition(FTabPosition: TTabPosition);
    procedure Visible(FVisible: Boolean);
    procedure Width(FWidth: Single);
    procedure SetFocus;
    procedure ResetFocus;
    procedure AutoCapture(FValue: Boolean);
    procedure DisableFocusEffect(FValue: Boolean);
    procedure UpdateEffects;
    procedure BeginUpdate;
    procedure EndUpdate;
    procedure RecalcSize;
    procedure RecalcEnabled;
    procedure RecalcOpacity;
    procedure RecalcUpdateRect;
    procedure RecalcAbsolute;
    procedure Repaint;
    procedure AddObject(const AObject: TFmxObject);
    procedure InsertObject(Index: Integer; const AObject: TFmxObject);
    procedure RemoveObject(const AObject: TFmxObject);
    procedure RemoveObject2(Index: Integer);
    function ContainsObject(const AObject: TFmxObject): Boolean;
    procedure ExchangeObjects(const AObject1, AObject2: TFmxObject);
    procedure DeleteChildren;
    function IsChild(AObject: TFmxObject): Boolean;
    function ChildrenCount: Integer;
    procedure BringToFront;
    procedure SendToBack;
    procedure BringChildToFront(Child: TFmxObject);
    procedure SendChildToBack(Child: TFmxObject);
    function IsEquals(AObject: TObject): Boolean;
    procedure SetTag(Tag: Integer);
    procedure SetHint(const FText: WideString);
    function GetTabHeight: Single;
    function GetOpacity: Single;
    function GetVisible: Boolean;
    function GetHeight: Single;
    function GetWidth: Single;
    function GetPressed: Boolean;
    function GetAutoCapture: Boolean;
    function GetDisableFocusEffect: Boolean;
    function GetMouseOver: Boolean;
    function GetObject: LongInt;
    function GetTag: Integer;
    function GetParent: Longint;
    procedure OnClick(Event: TNotifyEvent);
    procedure OnMouseDown(Event: TMouseEventF);
    procedure OnMouseMove(Event: TMouseMoveEventF);
    procedure OnMouseUp(Event: TMouseEventF);
    procedure OnMouseEnter(Event: TNotifyEvent);
    procedure OnMouseLeave(Event: TNotifyEvent);
    procedure OnMouseWheel(Event: TMouseWheelEvent);
    procedure OnResize(Event: TNotifyEvent);
    procedure OnResized(Event: TNotifyEvent);
    procedure OnActivate(Event: TNotifyEvent);
    procedure OnDeactivate(Event: TNotifyEvent);
    procedure OnCanFocus(Event: TCanFocusEvent);
    procedure OnKeyDown(Event: TKeyEvent);
    procedure OnKeyUp(Event: TKeyEvent);
    function Handle: TFmxObject;
    procedure Free;
  end;


hitman797 31-08-2023 08:54

Quote:

Originally Posted by Fak Eid (Post 502218)
Can we make the Directory box editable?

use FFolderTreeView / FStartMenuFolderTreeView

Code:

  // Folder TreeView
type
  FFolderTreeView = Interface(IUnknown)
    '{22193C2C-6109-4625-92A3-6CECE9A56348}'
    procedure FCreate(hHandle: HWND; FLeft, FTop, FWidth, FHeight: Integer; const ADir: WideString);
    procedure NewFolder(const Folder: WideString);
    procedure ChangeDirectory(const ADir: WideString);
    procedure OnChange(FEvent: TNotifyEvent);
    function GetCurrrentDir: WideString;
    procedure Left(FLeft: Integer);
    procedure Top(FTop: Integer);
    procedure Width(FWidth: Integer);
    procedure Height(FHeight: Integer);
    procedure Hide;
    procedure Show;
    function GetObject: Longint;
    function HandleHWND: HWND;
    procedure Free;
  End;
  // StartMenu Folder TreeView
type
  FStartMenuFolderTreeView = Interface(IUnknown)
    '{22193C2C-6109-4625-92A3-6CECE9A56348}'
    procedure FCreate(hHandle: HWND; FLeft, FTop, FWidth, FHeight: Integer; const ADir: WideString);
    procedure NewFolder(const Folder: WideString);
    procedure ChangeDirectory(const ADir: WideString);
    procedure OnChange(FEvent: TNotifyEvent);
    function GetCurrrentDir: WideString;
    procedure Left(FLeft: Integer);
    procedure Top(FTop: Integer);
    procedure Width(FWidth: Integer);
    procedure Height(FHeight: Integer);
    procedure Hide;
    procedure Show;
    function GetObject: Longint;
    function HandleHWND: HWND;
    procedure Free;
  End;


BLACKFIRE69 31-08-2023 08:58

Quote:

Originally Posted by Fak Eid (Post 502218)
@Mr.BlackFire69

1. If you open the Directory Dialog Box second time, the fluent effect is disabled at certain sections (Please find the photo at the link)

anything can cause this to happen; i don't know exactly what. maybe try changing the canvas quality.

Code:

FMXForm.CanvasQuality(cqHighPerformance);
this also changes the canvas quality of the other forms (Dir/Start/Custom).


Quote:

Originally Posted by Fak Eid (Post 502218)
Can we make the Directory box editable?

done.


Quote:

Originally Posted by Fak Eid (Post 502218)
2. Padding and margins are not working on FMemo. I want the content inside FMemo to be padded at certain distance which doesn't seem to be working

everything is ok inside the dll. maybe there's something wrong with firemonkey.


Quote:

Originally Posted by Fak Eid (Post 502218)
3. There is also one issue with the FToggleCheckbox. IsPressed is not working.

fixed.


Quote:

Originally Posted by Fak Eid (Post 502218)
4. Can you also enable OnChange method on FToggleCheckbox? This will be similar to FCheckbox Event. Onclick gives me before Event. It gives me the previous value before clicking. I need after Event, like after changing the toggle value of Checkbox what is the current value?

done.

Code:

new property:
procedure OnChange(Event: TNotifyEvent);


Quote:

Originally Posted by Fak Eid (Post 502218)
5. Is there a way to bring the Video file in the background and display text over it?

there's no way until now.

Fak Eid 31-08-2023 10:15

This doesn't fix it. It's happening same in the WPI Corepack.iss file you created and shared initially on the same forum. let me know, if it can help if I share the installer script?

Code:

DirBrowseDlg.FCreate('Select Install Directory', WizardForm.DirEdit.Text, True, False, 0.35, 0);
DirBrowseDlg.TextFontSettings('Bellefair Regular', VCLFontSizeToFMX2(14), {#Color});

Quote:

Originally Posted by BLACKFIRE69 (Post 502222)
anything can cause this to happen; i don't know exactly what. maybe try changing the canvas quality.

Code:

FMXForm.CanvasQuality(cqHighPerformance);


Fak Eid 31-08-2023 10:33

@Blackfire69

When trying to edit the directory box, weird things are happening. Like it's not proper like FEdit.
Backspace to delete does something else.
Moving the cursor to a location and editing edit something else completely.

I posted my Directory creation code in the post above. Let me know if I'm doing something wrong. Can you please check?

Quote:

Originally Posted by BLACKFIRE69 (Post 502222)
Can we make the Directory box editable?
done.


hitman797 01-09-2023 10:36

2 Attachment(s)
Quote:

Originally Posted by audiofeel (Post 502244)
@BLACKFIRE69
mr BLACKFIRE69! I need your help. My kung fu is useless here. You have added 3d objects to the module. Is it possible to add 3d page animation in this scenario?

@BLACKFIRE69

CAN YOU FIX pjScreen IN FLayer3D?

Code:

  FMXLayer3D[1].FCreate(FMXViewport3D.Handle);
  FMXLayer3D[1].Align(Client);
  //FMXLayer3D[1].Projection(pjScreen);
  FMXLayer3D[1].Transparency(True);
  FMXLayer3D[1].FillColor(ALNull);
  //
  FMXLayer3D[2].FCreate(FMXViewport3D.Handle);
  FMXLayer3D[2].Align(Client);
  //FMXLayer3D[2].Projection(pjScreen);
  FMXLayer3D[2].Transparency(True);
  FMXLayer3D[2].FillColor(ALNull);


Fak Eid 01-09-2023 14:12

Thanks for that advice earlier, I implemented the same on my installer. I just wanted to know if padding was not working or I was doing it wrong. Thanks to @Blackfire69 for clarification.

Quote:

Originally Posted by audiofeel (Post 502227)
Code:

DirBrowseDlg.EditFontSettings('Bellefair Regular', VCLFontSizeToFMX2(14), {#Color});
inside FMemo itself, you can only align text to the left or center and right.
Code:

procedure TextHorzAlign(HorzAlign: TTextAlign);
TTextAlign  = (txCenter, txLeading, txTrailing);

create 'FMEMO' with no background. Annotate it to 'FRectangle' and move it wherever you want. (or my translator translates the wrong thing)


BLACKFIRE69 02-09-2023 00:24

FMXInno - Dev
 
i'm working on an update. some users have mentioned that the installer appears too small at higher DPI values. can you guys test this on higher DPI settings and let me know how it looks and if it has the correct scaling? :)



Attachment:

BLACKFIRE69 02-09-2023 09:07

Quote:

Originally Posted by audiofeel (Post 502263)
I don't have a full test (just zoom 150%). Everything is fine. The problem is only with "FFluentDirBrowse"


now it should work.


.

BLACKFIRE69 05-09-2023 09:56

Quote:

Originally Posted by audiofeel (Post 502316)
@BLACKFIRE69
The progress bar always shows 97-99% after unpacking (no errors) . What and where did I do wrong again? Part of the code below
Code:

function ProgressCallback(OverallPct, CurrentPct, DiskTotalMB, DiskExtractedMB: integer; DiskName, CurrentFile, TimeStr1, TimeStr2, TimeStr3, Speed: WideString): longword;
begin
  Page3PB.SetValue(OverallPct, 1000);
-----------------
  Page3PB.FCreate(Page3.Handle, 64, 166, 671, 36, {#StyleColor}, $6C030303, False);
  Page3PB.Curve(4.0, 4.0);
  Page3PB.StrokeColor(ALNull);
  Page3PB.StrokeSetting(1.6, scRound, sdSolid, sjMiter);
  Page3PB.StrokeColorBack(ALMedGray);
  Page3PB.StrokeSettingBack(0.8, scRound, sdSolid, sjMiter);
  Page3PB.Opacity(0.9);
  Page3PB.FillGradient({#StyleColor}, ALMediumspringgreen, gsLinear);
  Page3PB.FillGradientLinearAngle(45);
  Page3PB.FillGradientAnimSetting(atOut, 1.2, 0, False, True, True);
  Page3PB.FillGradientAnimInterpolationType(itCircular);
  Page3PB.FillGradientAnimColors({#StyleColor}, ALMediumspringgreen, ALMediumspringgreen, {#StyleColor});
  Page3PB.FillGradientAnimEnable(True);




the new update will fix this.

BLACKFIRE69 05-09-2023 10:21

FMXInno - Updates
 
FMXInno - Updates : [2023-September-05]


This is a quality update fix for FMXInno on August 31.

Code:

* Fixed for higher DPI values.

* Updated IsOSMatched for Windows 11 23H2 (Sun Valley 3) update.
  - if IsOsMatched(B_WIN11_23H2) then ...

* Updated FluentAPI v2.0.
* Updated ISArcEx.
* Other quality improvements and bug fixes.


NOTE:
* Effective from this update onward, InnoSetup v5.6.1 or a newer version is required.





-------------------------------------------------------------------------------------------------------------------------------------------

Quote:

FMXInno - Updates : [2023-August-31]

Code:

* Added TImageList.
* Added TSpeedButton.
* Added TCornorButton.
* Added TMultiView.
* Added TShadowTextClassic.
* Added new functions.
* Added new properties.
* Included the fix for the 'white-square' issue during loading.
  - Don't forget to call the 'FMXForm.Show' after the 'FMXDesigning' procedure.

* Fixed DrawFrame.
* Some improvements and bug fixes.

------------------------------------------------------------------------------------------------------------------------------

Quote:

Originally Posted by Cesar82 (Post 500879)
@BLACKFIRE69, I don't follow your project very much, but I have a question.
Is it possible to define shadows in the labels and define a position for them with respect to the text like in CIU?
If you still don't have support for this, it would be interesting to have X and Y options to move the shadow with a default value of 1px position in relation to left and Top, or parameters for X and Y position for the shadow, with the default position being the shadow exactly in the position of the text.
Code:

procedure ShadowSetting(FColor: Integer; FOpacity, FSoftness: Single; FPosX, FPosY: Integer);


now we've the 'TShadowTextClassic' class, which allows users to change the position(X, Y) of the shadow.

Code:

procedure Shadow(FColor: TAlphaColor; OffsetX, OffsetY: Single);
------------------------------------------------------------------------------------------------------------------------------

Quote:

Originally Posted by audiofeel (Post 502133)
@BLACKFIRE69
Thanks for the update. Please answer, Can you make it so that you can take the icons from the system and not take them with you. By simply specifying the file index and icon, as is possible for any file on the system. And for displaying disks, and for displaying buttons "close the window", "minimize the window" and for many others. If not, then I'm just passing by.


i've added three new functions to help accomplish this.

Code:

function wGetSysDefaultIcons(const Src: WideString; SHLIcoSize: Cardinal; const Buffer: PAnsiChar; var Count: Cardinal): Integer;
function wGetSysDefaultIcons2(const Src, OutImgFile: WideString; SHLIcoSize: Cardinal): Boolean;
function wGetSysDefaultIconsSize(const Src: WideString; SHLIcoSize: Cardinal): Integer;

these functions allow you to extract icons in different sizes as listed below.

Code:

const
  SHL_ICO_SZ_LARGE              = $0000;  // 32x32 pixels.
  SHL_ICO_SZ_SMALL              = $0001;  // 16x16 pixels.
  SHL_ICO_SZ_EXTRALARGE        = $0002;  // 48x48 pixels.
  SHL_ICO_SZ_SYSSMALL          = $0003;  // SM_CXSMICON x SM_CYSMICON pixels.
  SHL_ICO_SZ_JUMBO              = $0004;  // 256x256 pixels. (Windows Vista and later.)

here 'Src' could be a file, directory or desktop shortcut (.lnk).

you'll find an example for this in the attachment

at the moment, if i extract icons from a windows ResDll using an index, then those icon files will only be '32x32' in maximum size. so let's use above functions.


Example:
Code:

{ GetSysDefaultIcons }
  if wGetLogicalDriveList(ADrvLst, CDrvIdx) then
  begin
    ASrc[1] := ADrvLst[CDrvIdx];
    ASrc[2] := ADrvLst[Length(ADrvLst) -1];
  end else
  begin
    ASrc[1] := 'C:\';
    if wIsDriveValid('D:\') then ASrc[2] := 'D:\'
    else if wIsDriveValid('E:\') then ASrc[2] := 'E:\'
    else if wIsDriveValid('F:\') then ASrc[2] := 'F:\'
    else if wIsDriveValid('G:\') then ASrc[2] := 'G:\'
  end;

  ASrc[3] := 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe';
  ASrc[4] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Desktop';
  ASrc[5] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Downloads';
  ASrc[6] := 'C:\Users\' + AddBackslash(GetUserNameString) + 'Documents';

  P := 0; Q := 0;

Code:

for i := 1 to C_RANGE do
  begin
    if i = (C_RANGE div 2) + 1  {i =4} then
    begin
      P := 0; Q := 160;
    end;

    AImage[i].FCreate(FMXForm.Handle);
    AImage[i].SetBounds(NSX(P + 80), NSY(Q + 80), NSX(100), NSY(100));

  #ifdef AMethod1  /* Extract SysDefaultIcons into a Buffer, then load them into AImage[i]  */
    ImgSize[i] := wGetSysDefaultIconsSize(ASrc[i], SHL_ICO_SZ_JUMBO);
    if ImgSize[i] <> -1 then
    begin
      SetLength(Buffer[i], ImgSize[i]);
      if wGetSysDefaultIcons(ASrc[i], SHL_ICO_SZ_JUMBO, Buffer[i], Count[i]) <> -1 then
        AImage[i].LoadPictureFromBuffer(Buffer[i], Count[i], wmTileStretch);
    end;
  #else            /* Extract SysDefaultIcons into the TmpDir, then load them into AImage[i] */
    ImgFile[i] := ExpandConstant('{tmp}\') + IntToStr(i) + '.png';
    if wGetSysDefaultIcons2(ASrc[i], ImgFile[i], SHL_ICO_SZ_JUMBO) then
    begin
      AImage[i].LoadPicture(ImgFile[i], wmTileStretch);
    end;
  #endif

    P := P + 150;
  end;
  { GetSysDefaultIcons }


'LoadImgFromBuffer' is only supported by the 'FImage' control. Other controls will get this support in future updates.

------------------------------------------------------------------------------------------------------------------------------

Quote:

Originally Posted by audiofeel (Post 502143)
MultiView. Needed sometimes. beautiful and modern thing, it's a pity that it is not in FMXInno...:(

the 'TMultiView' class has been added. an example for this could be found in the attachment.



The first post has been updated.


.

BLACKFIRE69 10-09-2023 11:41

Quote:

Originally Posted by audiofeel (Post 502403)
@blackfire69 Will you be able to add a line equalizer (which really reacts to music playback, and not a dummy?) How about in the Foobar2000 player.
Using vis_classic.dll or something else?


yes, it can be done with the 'XBass' plugin. i'll give it a try if i get some free time.

Fak Eid 11-09-2023 01:37

Directory Info Update on Editing Location
 
When user lands on Directory Page, currently there was no option to change the Game Name.

Consider for example, The game name is 'The Last of Us: Remake Part 1' and user wants to change it to 'The Last of Us' and install there, it was restricted on FEdit.

Attaching code snippet where the user will now have ability to do that:
Code:

  Page2Edit.FCreate(Page2.Handle);
  Page2Edit.SetBounds(NSSX(100), NSSY(190), NSSX(520), NSSY(35));
  Page2Edit.FontSetting('{#FontName}', VCLFontSizeToFMX2(13), ALGainsBoro);
  Page2Edit.CanFocus(True);
  Page2Edit.Enabled(True);
  Page2Edit.Text(MinimizePathName(WizardForm.DirEdit.Text, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
  Page2Edit.OnTyping(@BrowseEditOnChange);

Code:

procedure BrowseEditOnChange(Sender: TObject);
var
  PrevDrive, CurrentDrive: String;
begin
  PrevDrive := ExtractFileDrive(WizardForm.DirEdit.Text);
  CurrentDrive := ExtractFileDrive(Page2Edit.GetText);

  // Set the installation path to the edited text value
  WizardForm.DirEdit.Text := Page2Edit.GetText;

  if PrevDrive <> CurrentDrive then
    DirUpdateProc(nil);
end;

Let me know if any of you face issues.

Fak Eid 11-09-2023 01:44

@Blackfire69

1. Please acknowledge this issue when trying to use Edit on Directory section:
https://fileforums.com/showpost.php?...&postcount=471

2. Installation speed is still not smooth. When transitioning from, say suppose Data-01 to Data-02, it still drops after a certain point of time. For eg: At Data-01 if it was 64mb/s, when extracting Data-02 it refreshes (resets) and becomes 12mb/s after some time.
Not sure if it helps, but save the previous/average installation speed and when the disk transition happens, do (prev installation speed+ current callback speed)/2 (like take average)

BLACKFIRE69 11-09-2023 04:48

Quote:

Originally Posted by audiofeel (Post 502403)
@blackfire69 Will you be able to add a line equalizer (which really reacts to music playback, and not a dummy?) How about in the Foobar2000 player.
Using vis_classic.dll or something else?


updated the 'XBass' plugin, and it now includes a new function named 'xbassAddSpectrum'. you can utilize this function to meet your expectations.
additionally, please use the 'XBass' external plugin (.dll) since using the internal 'XBass' can lead to conflicts with 'FireMonkey'.


Quote:

Originally Posted by audiofeel (Post 502407)
@blackfire69
1.-About the window collapse animation...(MinimizeWindowCustomAnimated). Some users claim that on weak and not very powerful PCs, this option is performed with a delay and jerks. There may even be a collapse of the form. I couldn't repeat it. And to be honest, I don't care about this option (everyone can turn it on or off by themselves). But still review my script, maybe I did something wrong?

2.-It was also noticed that if the type of form is selected (FCreateImageForm), then the form does not return to its normal state after folding, but turns into a small rectangle (I attach a screenshot). Maybe it's my jamb (look through my script and maybe you'll find an error).


'MinimizeWindowCustomAnimated' now uses a different effect, meaning the old one has been replaced.
additionally, remember the following:
1. since this is just an effect, you need to call 'pMinimizeWindow' to do the actual minimization.
2. it does not support 'FCreateImageForm'. some of the features in the 'FMXInno' plugin shouldn't be there officially, so i had to use some tricks to integrate them. this may cause compatibility issues.


Code:

type
  TMinimizeAnimPos    = (mapTop, mapBottom, mapLeft, mapRight);

function MinimizeWindowCustomAnimated(MinimizeAnimPos: TMinimizeAnimPos): Boolean;


.

Fak Eid 11-09-2023 05:57

@BlackFire69
FProgressBar will always require a custom theme file to set up color and look. I was trying this with FThinProgressBar and the only thing I need is Orientation. Is it possible to add it to FThinProgressBar?
The reason to choose it over ProgressBar is to be able to custom code based on Color and be independent of styling. Like make it even Color Gradient.

Quote:

Originally Posted by BLACKFIRE69 (Post 502415)
updated the 'XBass' plugin, and it now includes a new function named 'xbassAddSpectrum'. you can utilize this function to meet your expectations.
additionally, please use the 'XBass' external plugin (.dll) since using the internal 'XBass' can lead to conflicts with 'FireMonkey'.
.


BLACKFIRE69 11-09-2023 07:59

Quote:

Originally Posted by Fak Eid (Post 502419)
@BlackFire69
FProgressBar will always require a custom theme file to set up color and look. I was trying this with FThinProgressBar and the only thing I need is Orientation. Is it possible to add it to FThinProgressBar?
The reason to choose it over ProgressBar is to be able to custom code based on Color and be independent of styling. Like make it even Color Gradient.



replaced 'FProgressBar' with 'FThinProgressBar'


.

Fak Eid 11-09-2023 11:36

1 Attachment(s)
@BlackFire69 Thank you FThinprogressBar update. I have one little question though.
Is there a way where we can show pop-up box over a FVideoPlayer. If not, is it possible for you to make it (as I have some amazing idea). If yes, can you show me a test code with it.

Attaching a photo as an example for what I want it look like.
A Video playing in the background instead of photo, and a pop-up display to show some information on top of it.

crachlow 11-09-2023 13:28

There the video is displayed on the panel, and only then there are inscriptions.

Tihiy_Don 11-09-2023 21:54

I ask you to observe backward compatibility or write what types of variables you changed in the libraries. Since I am now trying to update the script for a new library and get a lot of errors.

In some functions, you have changed the type from integer to single. I ask you to indicate this, since it is problematic to observe compatibility when updating the library.

BLACKFIRE69 11-09-2023 22:10

Quote:

Originally Posted by Tihiy_Don (Post 502433)
I ask you to observe backward compatibility or write what types of variables you changed in the libraries. Since I am now trying to update the script for a new library and get a lot of errors.

In some functions, you have changed the type from integer to single. I ask you to indicate this, since it is problematic to observe compatibility when updating the library.



adding backward compatibility can be a drawback in many cases. so, we should embrace the latest.


Quote:

Originally Posted by BLACKFIRE69 (Post 502123)
NOTE:
This update involves modifications to certain functions/procedures, which might require adjustments to current scripts.

https://i.ibb.co/2WhFn28/00.png

https://i.ibb.co/VTNMGC0/01.png


Fak Eid 11-09-2023 23:58

@audiofeel
I'm playing a video using FVideoPlayer in the background of a FCustomPage. I want to display a FPopupBox over this FCustomPage. I want to know if it can be made possible.

Quote:

Originally Posted by audiofeel (Post 502428)
Perhaps you need to play video through a third-party dll. This script at least has text over the video.


BLACKFIRE69 12-09-2023 07:47

FMXInno -Updates
 
FMXInno Update - [2023-Sep-12]


Code:

* Added new functions.
* Disabled runtime integrity checks.
* Fixed DirBrowse Edit.
* Updated FCreate* functions.
* Updated 'MinimizeWindowCustomAnimated' for ImageForms.
* Updated 'XBass' (internal/external).
* Updated 'ISArcEx' (internal/external).
* Removed lzma2 algorithm and used the lowest compression level.
  - FinalSize(old): 2.86 MB
  - FinalSize(new): 3.41 MB


Code:

{ PowerPlan ID }
const
  USER_PP_POWER_SAVER          = $0002;
  USER_PP_BALANCED            = $0004;
  USER_PP_HIGH_PERFORMANCE    = $0006;
  USER_PP_ULTIMATE_PERFORMANCE = $0008;
  USER_PP_UNKNOWN              = $0001;
 
function wPowerPlanGetActivePlan: Byte;
function wPowerPlanExist(const PowerPlanID: Byte): Boolean;
function wPowerPlanSetOrCreate(const PowerPlanID: Byte): Boolean;

var
  CurActivePowerPlanID: Byte;

Code:

function InitializeSetup(): Boolean;
begin
  CurActivePowerPlanID := wPowerPlanGetActivePlan;

  if (CurActivePowerPlanID = USER_PP_POWER_SAVER) or // Power saver
    (CurActivePowerPlanID = USER_PP_BALANCED) or // Balanced
    (CurActivePowerPlanID = USER_PP_UNKNOWN) then // Unknown (optional)
  begin
    if (not wPowerPlanSetOrCreate(USER_PP_HIGH_PERFORMANCE)) then // High performance
      MsgBox('High performance powerplan error.', mbError, MB_OK);
  end;

  FMXInnoInit;
  Result := True;
end;

procedure DeinitializeSetup();
begin
  wPowerPlanSetOrCreate(CurActivePowerPlanID);

  FMXInnoShutDown;
end;



-----------------------------------------------------------------------------------------------------------------------
Quote:

Originally Posted by audiofeel (Post 502407)
@blackfire69
MinimizeWindowCustomAnimated).

It was also noticed that if the type of form is selected (FCreateImageForm), then the form does not return to its normal state after folding, but turns into a small rectangle (I attach a screenshot). Maybe it's my jamb (look through my script and maybe you'll find an error).


'MinimizeWindowCustomAnimated' has been fixed for 'ImageForms'.


-----------------------------------------------------------------------------------------------------------------------
Quote:

Originally Posted by Fak Eid (Post 502412)
@Blackfire69

1. Please acknowledge this issue when trying to use Edit on Directory section:
https://fileforums.com/showpost.php?...&postcount=471


fixed.


-----------------------------------------------------------------------------------------------------------------------
Quote:

Originally Posted by Fak Eid (Post 502412)

2. Installation speed is still not smooth. When transitioning from, say suppose Data-01 to Data-02, it still drops after a certain point of time. For eg: At Data-01 if it was 64mb/s, when extracting Data-02 it refreshes (resets) and becomes 12mb/s after some time.
Not sure if it helps, but save the previous/average installation speed and when the disk transition happens, do (prev installation speed+ current callback speed)/2 (like take average)



1. 'ISArcEx' only calculates the current extraction speed for the current archive.
2. 'ISArcExReduceCalcAccuracy' has been updated.
- procedure ISArcExReduceCalcAccuracy(Factor: Byte);
- Factor: 1-5 (default = 1).


.

XH75819116 12-09-2023 19:34

win10 21h1 FMXForm:= InitFormHandle unresponsive

BLACKFIRE69 12-09-2023 20:54

Quote:

Originally Posted by XH75819116 (Post 502459)
win10 21h1 FMXForm:= InitFormHandle unresponsive


i don't have Windows 10 21H1 at the moment, but it's working fine on Windows 10 22H2 (even on a virtual machine).


screenshot:

.

BYRedex 13-09-2023 08:14

2 Attachment(s)
Hi! What about rounding out the shape?
I want to use "FMXForm.FCreateNormal(WizardForm.Handle);" so that I can put any image on top of the form and it will be rounded.

On the screenshots you can see it perfectly well, everything turns out using this:

Code:

function SetWindowRgn(hWnd: HWND; hRgn: LongWord; bRedraw: BOOL): Integer;
external '[email protected] stdcall';

SetWindowRgn(FMXForm.Handle, FormRegion, True);

But then the form and FMX live separately, i.e. the FMX layer moves on the WizardForm form.

SetWindowRgn works only with "FMXForm.FCreateNormal", I want to have the same view for all systems (from Win7 to 11) and have the ability to set parameters of form rounding.

BLACKFIRE69 13-09-2023 08:17

Quote:

Originally Posted by audiofeel (Post 502471)
@BLACKFIRE69

Is it impossible to get an icon to display by the icon index?
wGetSysDefaultIcons2

something like this...

%SystemRoot%\System32\SHELL32.dll, -123



maximum size will be 32x32. if this is ok to you, let me know.


.

BLACKFIRE69 13-09-2023 09:59

Quote:

Originally Posted by audiofeel (Post 502478)
Disappointment. The size is too small. But still this function is useful in future cases as in the screenshot below.



how about now?


.

hitman797 13-09-2023 17:03

1 Attachment(s)
Quote:

Originally Posted by audiofeel (Post 502483)
do you remember when we did the metro install? now the necessary objects have been added, but I don't understand everything. can you show an example
MultiView, SpeedBtn etc.

Metro Installer

BLACKFIRE69 14-09-2023 07:23

Quote:

Originally Posted by audiofeel (Post 502471)
@BLACKFIRE69

Is it impossible to get an icon to display by the icon index?
wGetSysDefaultIcons2

something like this...

%SystemRoot%\System32\SHELL32.dll, -123



Code:

{ ResIconSize }
const
  RIS_SMALL                    = $0001;  //  16 x 16
  RIS_MEDIUM                    = $0002;  //  32 x 32
  RIS_LARGE                    = $0003;  //  48 x 48
  RIS_EXTRA_LARGE              = $0004;  //  64 x 64
  RIS_EXTRA_EXTRA_LARGE        = $0005;  // 128 x 128
  RIS_JUMBO                    = $0006;  // 256 x 256


function wGetSysDefaultIconsFromResLib(const AModule: WideString;
  AIndex, RISIcoSize: Cardinal; const Buffer: PAnsiChar; var Count: Cardinal): Integer;

function wGetSysDefaultIconsFromResLib2(const AModule, AOutFile: WideString;
  AIndex, RISIcoSize: Cardinal): Boolean;

function wGetSysDefaultIconsSizeFromResLib(const AModule: WideString;
  AIndex, RISIcoSize: Cardinal): Integer;

Code:

{ GetSysDefaultIcons }
  AModule  := 'C:\Windows\SystemResources\imageres.dll.mun';

  AIndex[1] := 31;  // C-Drive
  AIndex[2] := 27;  // OtherDrvs
  AIndex[3] := 103; // Music
  AIndex[4] := 105; // Desktop
  AIndex[5] := 175; // Donwloads
  AIndex[6] := 107; // Documents

  P := 0; Q := 0;

  for i := 1 to C_RANGE do
  begin
    if i = (C_RANGE div 2) + 1  {i =4} then
    begin
      P := 0; Q := 160;
    end;

    AImage[i].FCreate(FMXForm.Handle);
    AImage[i].SetBounds(NSX(P + 130), NSY(Q + 80), NSX(100), NSY(100));

  #ifdef AMethod1  /* Extract SysDefaultIcons into a Buffer, then load them into AImage[i]  */
    ImgSize[i] := wGetSysDefaultIconsSizeFromResLib(AModule, AIndex[i], RIS_EXTRA_EXTRA_LARGE);
    if ImgSize[i] <> -1 then
    begin
      SetLength(Buffer[i], ImgSize[i]);
      if wGetSysDefaultIconsFromResLib(AModule, AIndex[i], RIS_EXTRA_EXTRA_LARGE, Buffer[i], Count[i]) <> -1 then
        AImage[i].LoadPictureFromBuffer(Buffer[i], Count[i], wmTileStretch);
    end;
  #else            /* Extract SysDefaultIcons into the TmpDir, then load them into AImage[i] */
    ImgFile[i] := ExpandConstant('{tmp}\') + IntToStr(i) + '.png';
    if wGetSysDefaultIconsFromResLib2(AModule, ImgFile[i], AIndex[i], RIS_EXTRA_EXTRA_LARGE) then
    begin
      AImage[i].LoadPicture(ImgFile[i], wmTileStretch);
    end;
  #endif

    P := P + 150;
  end;
  { GetSysDefaultIcons }


.

BLACKFIRE69 14-09-2023 08:49

Quote:

Originally Posted by audiofeel (Post 502492)
I have a question. Five buttons, four of which are "Align Top" and the fifth "Align Bottom". Why does the fourth button come in second place?


Delphi/FMX: How to add a dynamically created top-aligned component


.

Jahan1373 14-09-2023 20:12

Quote:

Originally Posted by hitman797 (Post 502484)
Metro Installer

Hello brother, please give the complete script, where should I download it, thanks

BLACKFIRE69 15-09-2023 05:29

Quote:

Originally Posted by audiofeel (Post 502503)
@BLACKFIRE69 How to avoid animation jerks when pointing the pointer at different objects with the same task? I didn't come up with anything better, as in the code below. Everything goes smoothly but with only one object (animation).
Code:


TObject(PanelBtnClick[1].GetObject), TObject(PanelBtnClick[2].GetObject), TObject(PanelBtnClick[3].GetObject),
TObject(PanelBtnClick[4].GetObject), TObject(PanelBtnClick[5].GetObject), TObject(LeftPanel.GetObject):
begin 
  FMXForm.AnimateFloatDelay(LeftPanel.Handle, 'Width', NSX(280), 0.5, 0.2,
  atInOut, itBack);
end;

If you make an array as in the example below, there will still be jerks between objects (animation).
Code:


procedure CommonMouseEnter(Sender: TObject);
var
  i: Integer;
begin
  i := -1;
  case Sender of
    TObject(Btn[1].GetObject): i := 1;
    TObject(Btn[2].GetObject): i := 2;
    TObject(Btn[3].GetObject): i := 3;
    TObject(Btn[4].GetObject): i := 4;
    TObject(Btn[5].GetObject): i := 5;
  end;

  if i <> -1 then
    Btn[i].FontSetting('{#MyFont2Name}', NS(52), VCLColorToFMXColor($EEEE00));
end;




i'm not sure. could you provide an example or explain further?

BLACKFIRE69 15-09-2023 05:51

FMXInno - Updates
 
FMXInno - Updates: 2023-Sep-15



The latest version has been added to the first post.

BLACKFIRE69 15-09-2023 06:04

Quote:

Originally Posted by audiofeel (Post 502506)
Ok!
here is everything I had enough for)))


if you are talking about Custom MultiView, you need to plan it out a bit more thoroughly than this.


.

BLACKFIRE69 15-09-2023 06:43

Quote:

Originally Posted by BLACKFIRE69 (Post 502508)
if you are talking about Custom MultiView, you need to plan it out a bit more thoroughly than this.


.



screenshot:

.

Fak Eid 15-09-2023 08:12

@Blackfire69

If you have some time, can you please work on enabling some component over FVideoPlayer (like even FPopUpBox) will also be fine.

You can check this post for the requirement I'm asking for.
https://fileforums.com/showpost.php?...&postcount=493

hitman797 15-09-2023 11:57

Quote:

Originally Posted by audiofeel (Post 502511)
Is it necessary for OnEnter?

OnMouseEnter is Trigger to start animation.
OnMouseLeave is Trigger to Reverse animation.
You can use OnClick.

BLACKFIRE69 19-09-2023 04:19

FMXInno - Updates
 
FMXInno Moments Updates: [2023-September-19]

Code:

What's New:

* Added 'FSplashAnimated' with Sounds.
* Updated 'FUserInfo'.
* Updated 'ChatGPT':
  - The example has been updated.
  - Added a simple output.

* Updated 'ISArcEx':
  - 'ISArcExReduceCalcAccuracy' is now straightforward.
  - The range of the factor has increased from 5 to 10 (1-10).
  - Factor = 1 means it delays the calculations of RemainingTime and Speeds by 0.25 seconds.
  - Factor = 2 -> delay by 0.50 seconds.
  - Factor = 3 -> delay by 0.75 seconds.
  - Factor = 4 -> delay by 1.00 seconds.
  - And so on.


The first post has been updated.

.

BLACKFIRE69 21-09-2023 05:23

Quote:

Originally Posted by hitman797 (Post 502248)
@BLACKFIRE69

CAN YOU FIX pjScreen IN FLayer3D?

Code:

  FMXLayer3D[1].FCreate(FMXViewport3D.Handle);
  FMXLayer3D[1].Align(Client);
  //FMXLayer3D[1].Projection(pjScreen);
  FMXLayer3D[1].Transparency(True);
  FMXLayer3D[1].FillColor(ALNull);
  //
  FMXLayer3D[2].FCreate(FMXViewport3D.Handle);
  FMXLayer3D[2].Align(Client);
  //FMXLayer3D[2].Projection(pjScreen);
  FMXLayer3D[2].Transparency(True);
  FMXLayer3D[2].FillColor(ALNull);



@hitman797,

there's no need for any fixes with the Projection; it's working perfectly as intended.

however, please keep in mind that you should call Projection(pjScreen) before Align(Client) to ensure proper functionality.


For additional information, please refer to this: Creating a 2D Interface in a 3D App (FireMonkey 3D)


.


All times are GMT -7. The time now is 11:55.

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