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

Reply
 
Thread Tools Display Modes
  #466  
Old 31-08-2023, 09:46
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 461
Thanked 182 Times in 118 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by Fak Eid View Post
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;
Reply With Quote
Sponsored Links
  #467  
Old 31-08-2023, 09:54
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 461
Thanked 182 Times in 118 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by Fak Eid View Post
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;
Reply With Quote
  #468  
Old 31-08-2023, 09:58
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 673
Thanks: 479
Thanked 2,423 Times in 547 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by Fak Eid View Post
@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 View Post
Can we make the Directory box editable?
done.


Quote:
Originally Posted by Fak Eid View Post
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 View Post
3. There is also one issue with the FToggleCheckbox. IsPressed is not working.
fixed.


Quote:
Originally Posted by Fak Eid View Post
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 View Post
5. Is there a way to bring the Video file in the background and display text over it?
there's no way until now.

Last edited by BLACKFIRE69; 02-09-2023 at 10:08.
Reply With Quote
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (31-08-2023), Fak Eid (31-08-2023), hitman797 (31-08-2023)
  #469  
Old 31-08-2023, 11:15
Fak Eid Fak Eid is offline
Registered User
 
Join Date: Jun 2023
Location: Mars
Posts: 147
Thanks: 95
Thanked 140 Times in 54 Posts
Fak Eid is on a distinguished road
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 View Post
anything can cause this to happen; i don't know exactly what. maybe try changing the canvas quality.

Code:
FMXForm.CanvasQuality(cqHighPerformance);
Reply With Quote
  #470  
Old 31-08-2023, 11:33
Fak Eid Fak Eid is offline
Registered User
 
Join Date: Jun 2023
Location: Mars
Posts: 147
Thanks: 95
Thanked 140 Times in 54 Posts
Fak Eid is on a distinguished road
@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 View Post
Can we make the Directory box editable?
done.

Last edited by Fak Eid; 05-09-2023 at 11:52.
Reply With Quote
  #471  
Old 31-08-2023, 12:37
audiofeel's Avatar
audiofeel audiofeel is offline
Registered User
 
Join Date: Jan 2013
Location: Russia
Posts: 379
Thanks: 451
Thanked 877 Times in 317 Posts
audiofeel is on a distinguished road
Quote:
Originally Posted by Fak Eid View Post
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?
Code:
DirBrowseDlg.EditFontSettings('Bellefair Regular', VCLFontSizeToFMX2(14), {#Color});
Quote:
Originally Posted by Fak Eid View Post
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
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)
__________________
https://t.me/FMXInno

Last edited by audiofeel; 27-12-2023 at 11:07.
Reply With Quote
The Following User Says Thank You to audiofeel For This Useful Post:
Fak Eid (01-09-2023)
  #472  
Old 01-09-2023, 11:36
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 461
Thanked 182 Times in 118 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@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);
Attached Images
File Type: png Untitled 1.png (368.9 KB, 129 views)
Attached Files
File Type: 7z AtomicHeart[02.09].7z (6.34 MB, 15 views)

Last edited by hitman797; 02-09-2023 at 01:43.
Reply With Quote
The Following User Says Thank You to hitman797 For This Useful Post:
audiofeel (01-09-2023)
  #473  
Old 01-09-2023, 15:12
Fak Eid Fak Eid is offline
Registered User
 
Join Date: Jun 2023
Location: Mars
Posts: 147
Thanks: 95
Thanked 140 Times in 54 Posts
Fak Eid is on a distinguished road
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 View Post
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)
Reply With Quote
The Following User Says Thank You to Fak Eid For This Useful Post:
audiofeel (01-09-2023)
  #474  
Old 02-09-2023, 01:24
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 673
Thanks: 479
Thanked 2,423 Times in 547 Posts
BLACKFIRE69 is on a distinguished road
Arrow 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:

Last edited by BLACKFIRE69; 02-09-2023 at 10:07.
Reply With Quote
The Following 4 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (02-09-2023), Fak Eid (02-09-2023), hitman797 (02-09-2023), Tihiy_Don (03-09-2023)
  #475  
Old 02-09-2023, 05:43
audiofeel's Avatar
audiofeel audiofeel is offline
Registered User
 
Join Date: Jan 2013
Location: Russia
Posts: 379
Thanks: 451
Thanked 877 Times in 317 Posts
audiofeel is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
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:
I don't have a full test (just zoom 150%). Everything is fine. The problem is only with "FFluentDirBrowse"
__________________
https://t.me/FMXInno

Last edited by audiofeel; 27-12-2023 at 11:07.
Reply With Quote
The Following 2 Users Say Thank You to audiofeel For This Useful Post:
BLACKFIRE69 (02-09-2023), hitman797 (02-09-2023)
  #476  
Old 02-09-2023, 10:07
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 673
Thanks: 479
Thanked 2,423 Times in 547 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
I don't have a full test (just zoom 150%). Everything is fine. The problem is only with "FFluentDirBrowse"

now it should work.


.

Last edited by BLACKFIRE69; 14-07-2024 at 03:04.
Reply With Quote
The Following 4 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (02-09-2023), hitman797 (02-09-2023), Lord.Freddy (02-09-2023), Tihiy_Don (03-09-2023)
  #477  
Old 02-09-2023, 10:58
audiofeel's Avatar
audiofeel audiofeel is offline
Registered User
 
Join Date: Jan 2013
Location: Russia
Posts: 379
Thanks: 451
Thanked 877 Times in 317 Posts
audiofeel is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
now it should work.
.
Yes, everything looks great now
__________________
https://t.me/FMXInno

Last edited by audiofeel; 27-12-2023 at 11:07.
Reply With Quote
The Following 2 Users Say Thank You to audiofeel For This Useful Post:
BLACKFIRE69 (02-09-2023), hitman797 (02-09-2023)
  #478  
Old 05-09-2023, 10:18
audiofeel's Avatar
audiofeel audiofeel is offline
Registered User
 
Join Date: Jan 2013
Location: Russia
Posts: 379
Thanks: 451
Thanked 877 Times in 317 Posts
audiofeel is on a distinguished road
ProgressBar 98%

@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);
__________________
https://t.me/FMXInno

Last edited by audiofeel; 27-12-2023 at 11:07.
Reply With Quote
The Following User Says Thank You to audiofeel For This Useful Post:
hitman797 (05-09-2023)
  #479  
Old 05-09-2023, 10:56
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 673
Thanks: 479
Thanked 2,423 Times in 547 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@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.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (05-09-2023), hitman797 (05-09-2023)
  #480  
Old 05-09-2023, 11:21
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 673
Thanks: 479
Thanked 2,423 Times in 547 Posts
BLACKFIRE69 is on a distinguished road
Arrow 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 View Post
@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 View Post
@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 View Post
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.


.

Last edited by BLACKFIRE69; 14-07-2024 at 03:04.
Reply With Quote
The Following 7 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (05-09-2023), audiofeel (05-09-2023), Behnam2018 (07-09-2023), hitman797 (05-09-2023), Lord.Freddy (05-09-2023), Razor12911 (10-09-2023), Tihiy_Don (06-09-2023)
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
Windows Fluent Effects Standalone API - InnoSetup / VCL / FXM BLACKFIRE69 Conversion Tutorials 0 15-11-2023 18:35
Windows Phone Installer similar to razor12911's original design? Kitsune1982 Conversion Tutorials 0 02-07-2020 14:04
INDEX - Conversion Tutorial Index Razor12911 Conversion Tutorials 5 11-06-2020 03:05
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 10:48



All times are GMT -7. The time now is 02:25.


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