Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 14-09-2023, 07:23
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@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 }

.

Last edited by BLACKFIRE69; 14-07-2024 at 02:07.
Reply With Quote
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (14-09-2023), hitman797 (14-09-2023), Lord.Freddy (14-09-2023)
Sponsored Links
  #2  
Old 14-09-2023, 08:49
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
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


.

Last edited by BLACKFIRE69; 14-07-2024 at 02:07.
Reply With Quote
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (14-09-2023), hitman797 (14-09-2023), Lord.Freddy (14-09-2023)
  #3  
Old 15-09-2023, 05:29
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@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?
Reply With Quote
The Following User Says Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (15-09-2023)
  #4  
Old 15-09-2023, 05:51
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
BLACKFIRE69 is on a distinguished road
FMXInno - Updates

FMXInno - Updates: 2023-Sep-15



The latest version has been added to the first post.
Reply With Quote
  #5  
Old 15-09-2023, 06:04
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
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.


.

Last edited by BLACKFIRE69; 14-07-2024 at 02:07.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (15-09-2023), hitman797 (15-09-2023)
  #6  
Old 15-09-2023, 06:43
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
if you are talking about Custom MultiView, you need to plan it out a bit more thoroughly than this.


.


screenshot:

.

Last edited by BLACKFIRE69; 14-07-2024 at 02:08.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (15-09-2023), hitman797 (15-09-2023)
  #7  
Old 15-09-2023, 11:57
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
Is it necessary for OnEnter?
OnMouseEnter is Trigger to start animation.
OnMouseLeave is Trigger to Reverse animation.
You can use OnClick.
Reply With Quote
The Following User Says Thank You to hitman797 For This Useful Post:
audiofeel (15-09-2023)
  #8  
Old 19-09-2023, 04:19
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
BLACKFIRE69 is on a distinguished road
Arrow 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.

.

Last edited by BLACKFIRE69; 14-07-2024 at 02:08.
Reply With Quote
The Following 5 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (19-09-2023), Fak Eid (20-09-2023), hitman797 (19-09-2023), Lord.Freddy (19-09-2023), Tihiy_Don (19-09-2023)
  #9  
Old 24-09-2023, 12:16
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
If we take your script as a basis and add FComboColorBox activation to it when you activate the FComboColorBox for the first time, it does not appear where it was intended Why??
I think the problem is in the arrangement.
Attached Images
File Type: png Screenshot 2023-09-24 201138.png (374.8 KB, 141 views)
Attached Files
File Type: 7z Thanks Gift 2024.7z (4.17 MB, 14 views)
Reply With Quote
  #10  
Old 25-09-2023, 14:37
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@BLACKFIRE69
Show an example of how to change the color of objects on the fly, as in the example below? FReactangle(FillColor.Stroke.Color). I can't do it with FColorbox.I can't do it. The color changes if you only touch the object.
Code:
var
  UIColour: array of TAlphaColor = [$B93A4955, $FF202B2F, $FFC0233C];
procedure TForm1.ComboColorBox1Change(Sender: TObject);
var
  I, J: Integer;
begin
  if ComboColorBox1 = Sender then
    J := 0;
  if ComboColorBox2 = Sender then
    J := 1;
  if ComboColorBox3 = Sender then
    J := 2;
  for I := 0 to ComponentCount - 1 do
  begin
    if (Components[I] is TShape) then
    begin
      if TShape(Components[I]).TagString = J.ToString then
        TShape(Components[I]).Fill.Color := TComboColorBox(Sender).Color;
      if TShape(Components[I]).TagString = (J + Length(UIColour)).ToString then
        TShape(Components[I]).Stroke.Color := TComboColorBox(Sender).Color;
    end;
    UIColour[J] := TComboColorBox(Sender).Color;
  end;
end;
see this, change the color of objects on the fly.
Code:
FMXColorAnimation[1].StopAtCurrent;
FMXColorAnimation[1].SetColors(FMXComboColorBox[2].GetColor, FMXComboColorBox[1].GetColor);
FMXColorAnimation[1].Start;
Code:
FMXArc[2].StrokeColor(FMXComboColorBox[3].GetColor);
FMXCircle[5].StrokeColor(FMXComboColorBox[3].GetColor);
FMXRectangle[87].FillColor(FMXComboColorBox[3].GetColor);
Attached Images
File Type: png Screenshot 2023-09-25 223350.png (432.1 KB, 95 views)
Attached Files
File Type: 7z Thanks Gift 2024.7z (4.03 MB, 7 views)

Last edited by hitman797; 25-09-2023 at 14:45.
Reply With Quote
The Following User Says Thank You to hitman797 For This Useful Post:
audiofeel (25-09-2023)
  #11  
Old 25-09-2023, 21:35
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
when the installation really goes into error, the animation of the last page does not seem very successful, but it is better than without it.
move all the objects in the FMXTabItem[11] to FMXTabItem[4].
Code:
FMXTabItem[11] in FMXLayer3D[2].
FMXTabItem[4] in FMXLayer3D[1].
Reply With Quote
The Following User Says Thank You to hitman797 For This Useful Post:
audiofeel (25-09-2023)
  #12  
Old 26-09-2023, 08:06
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
I. very interesting, but nothing is clear
-------
II. above in the posts you wrote that you may need to rearrange the procedures and then the ColorBox will appear where necessary. I finally found this place. you need to Align(Right); remove to the end.
-------
III. you need to think something about calculating the size of the components. we are not on the components page. probably do something like that. I don't know...
Code:
procedure TForm1.CheckBox2Click(Sender: TObject);
begin
if TCheckBox(Sender).Checked then  sum3:=sum3+TCheckBox(Sender).Tag/100 else
sum3:=sum3-TCheckBox(Sender).Tag/100;
end;
Code:
[Component0]
Name=Core files
Size=30000

[Component1]
Name=Need For Speed Underground
Size=30000

[Component2]
Name=Need For Speed Underground 2
Size=30000

[Component3]
Name=Need For Speed Most Wanted 05'
Size=30000

[Component4]
Name=Need For Speed Carbon
Size=30000

[Component5]
Name=Need For Speed Pro Street
Size=30000

[Component6]
Name=Need For Speed Undercover
Size=30000

[Component7]
Name=Need For Speed Shift
Size=30000

[Component8]
Name=Need For Speed Hot Pursuit
Size=30000

[Component9]
Name=Need For Speed The Run
Size=30000

[Component10]
Name=Need For Speed Shift 2 Unleashed
Size=30000

[Component10]
Name=Need For Speed Most Wanted 12'
Size=30000

[Component11]
Name=Need For Speed Rivals
Size=30000

[Component12]
Name=Need For Speed 15'
Size=30000
Code:
function GetIniBool(const Section, Key: String; const Default: Boolean; const Filename: String): Boolean;
function GetIniInt(const Section, Key: String; const Default, Min, Max: Longint; const Filename: String): Longint;
function GetIniString(const Section, Key, Default, Filename: String): String;
Reply With Quote
  #13  
Old 28-09-2023, 14:00
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
[B]
Can 't this code be shortened somehow ?
Code:
procedure OnChange(Sender: TObject);
begin
  case Sender of
    TObject(FMXComboColorBox[1].GetObject):
    begin
      FMXRectangle[97].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[7].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[8].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[9].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[10].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[11].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[12].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[13].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[14].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[15].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[16].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[17].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[18].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[20].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[21].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[22].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[23].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[24].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[35].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[36].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[37].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[38].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[39].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[50].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[51].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[52].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[53].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[54].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[62].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[63].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[64].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[65].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[66].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[75].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[84].FillColor(FMXComboColorBox[1].GetColor);
      FMXArc[1].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[85].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[86].FillColor(FMXComboColorBox[1].GetColor);
      FMXRectangle[93].FillColor(FMXComboColorBox[1].GetColor);
    end;



Code:
var
  MyArr: array of Integer;

procedure FMXInnoInit;
var
  I: Integer;
begin
  SetArrayLength(MyArr, 38);

  for I := 0 to 37 do
  begin
    case I of
      0..11   : MyArr[i]  :=  7 + I;        // 7..18
      12..16  : MyArr[i]  := 20 + (I - 12); // 20..24
      17..21  : MyArr[i]  := 35 + (I - 17); // 35..39
      22..26  : MyArr[i]  := 50 + (I - 22); // 50..54
      27..31  : MyArr[i]  := 62 + (I - 27); // 62..66
      32      : MyArr[32] := 75;            // 75
      33..35  : MyArr[i]  := 84 + (I - 33); // 84..86
      36      : MyArr[36] := 93;            // 93
      37      : MyArr[37] := 97;            // 97
    end;
  end;
end;

procedure OnChange(Sender: TObject);
var
  I: Integer;
begin
  case Sender of
    TObject(FMXComboColorBox[1].GetObject):
    begin
      FMXArc[1].FillColor(FMXComboColorBox[1].GetColor);

      for I := Low(MyArr) to High(MyArr) do
        FMXRectangle[MyArr[I]].FillColor(FMXComboColorBox[1].GetColor);
    end;
  end;
end;

Last edited by BLACKFIRE69; 28-09-2023 at 16:50.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (28-09-2023), hitman797 (28-09-2023)
  #14  
Old 29-09-2023, 15:14
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
Sorry, I forgot to mention that there are three colorbox and three colors .
Code:
var
  MyArr: array of Integer;

procedure FMXInnoInit;
var
  I: Integer;
begin
  SetArrayLength(MyArr, 38);

  for I := 0 to 37 do
  begin
    case I of
      I=(0..11)    : MyArr[i]  :=  7 + I;            // 7..18  //  7 + 11 = 18;
      I=(12..16)  : MyArr[i]  := 20 + (I - 12); // 20..24 // 20 + (16 - 12)= 24;
      I=(17..21)  : MyArr[i]  := 35 + (I - 17); // 35..39 // 35 + (21 - 17)= 39;
      I=(22..26)  : MyArr[i]  := 50 + (I - 22); // 50..54 // 50 + (26 - 22)= 54;
      I=(27..31)  : MyArr[i]  := 62 + (I - 27); // 62..66 // 62 + (31 - 27)= 66;
      I=(32)        : MyArr[32] := 75;              // 75      // 75;
      I=(33..35)  : MyArr[i]  := 84 + (I - 33); // 84..86 // 84 + (35 - 33)= 86; 
      I=(36)        : MyArr[36] := 93;              // 93      // 93;
      I=(37)        : MyArr[37] := 97;              // 97      // 97;
    end;
  end;
end;

procedure OnChange(Sender: TObject);
var
  I: Integer;
begin
  case Sender of
    TObject(FMXComboColorBox[1].GetObject):
    begin
      FMXArc[1].FillColor(FMXComboColorBox[1].GetColor);

      for I := Low(MyArr) to High(MyArr) do
        FMXRectangle[MyArr[I]].FillColor(FMXComboColorBox[1].GetColor);
    end;
  end;
end;
Reply With Quote
The Following User Says Thank You to hitman797 For This Useful Post:
audiofeel (29-09-2023)
  #15  
Old 02-10-2023, 23:53
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 699
Thanks: 486
Thanked 2,603 Times in 572 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@BLACKFIRE69
Is there any way to get a list of disks in a listbox? I don't quite understand how to do this. The example with the combobox does not fit.
Code:
procedure GetDisks;
var
  w: dword;
  Root: string;
  i, DiskType: integer;
begin
  w:= GetLogicalDrives;
  Root:= '#:\';
  for i:= 0 to 24 do
  begin
    Root[1]:= Chr(Ord('A') + i);
    if (W and (1 shl i)) > 0 then
      if (GetDriveType(PAnsiChar(Root)) = DRIVE_FIXED) then
    Edit1Combo.AddItem(Root);
  end;
  Edit1Combo.SetItemIndex(0);
end;


it's not a big deal.

Code:
var
  ...
  mListBox  : FListBox;
  mListBoxItem: array of FListBoxItem;
  ...

procedure FMXInnoInit;
begin
  ...
  mListBox  := InitListBoxHandle;
  ...
end;

procedure InitializeWizard();
begin
  ...
  FMXDesigning;
  FMXForm.Show;

  mListBox.SetItemIndex(2);   // i-1
  ...
end;

procedure ListBoxOnChange(Sender: TObject);
begin
  if mListBox.GetItemIndex > -1 then
    WinTB1.Text('Selected Drive: [' + mListBox.GetItemText(mListBox.GetItemIndex) + ']');
end;
Code:
procedure FMXDesigning;
var
  i, CDrvIdx: Integer;
  ADrvLst: TArrWStr;
begin
  ...

  if not wGetLogicalDriveList(ADrvLst, CDrvIdx) then
  begin
    Log('"wGetLogicalDriveList" failed!');
    MsgBox('"wGetLogicalDriveList" failed!', mbError, MB_OK);
    // try another way.
  end;

  { ListBox }
  mListBox.FCreate(FMXForm.Handle);
  mListBox.SetBounds(NSX(32), NSY(53), NSX(297), NSY(249));
  mListBox.OnChange(@ListBoxOnChange);

  { Items }
  SetArrayLength(mListBoxItem, GetArrayLength(ADrvLst));
  
  mListBox.BeginUpdate; 

  for i := 0 to GetArrayLength(ADrvLst) - 1 do
  begin
    mListBoxItem[i] := InitListBoxItemHandle;
    mListBoxItem[i].FCreate(mListBox.Handle);
    mListBoxItem[i].Text(ADrvLst[i]);
    mListBox.AddItem(mListBoxItem[i].Handle);
  end;

  mListBox.EndUpdate;
  ...
end;

.

Last edited by BLACKFIRE69; 14-07-2024 at 02:09.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (03-10-2023), hitman797 (03-10-2023)
Reply


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 17:35
Windows Phone Installer similar to razor12911's original design? Kitsune1982 Conversion Tutorials 0 02-07-2020 13:04
INDEX - Conversion Tutorial Index Razor12911 Conversion Tutorials 5 11-06-2020 02:05
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 05:29.


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