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 15-09-2023, 05:29
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 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)
Sponsored Links
  #2  
Old 15-09-2023, 05:51
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 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
  #3  
Old 15-09-2023, 06:04
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 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)
  #4  
Old 15-09-2023, 06:43
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 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)
  #5  
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)
  #6  
Old 19-09-2023, 04:19
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 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)
  #7  
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, 140 views)
Attached Files
File Type: 7z Thanks Gift 2024.7z (4.17 MB, 14 views)
Reply With Quote
  #8  
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, 94 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)
  #9  
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)
  #10  
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
  #11  
Old 28-09-2023, 14:00
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 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)
  #12  
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)
  #13  
Old 02-10-2023, 23:53
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 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)
  #14  
Old 03-10-2023, 21:46
Jahan1373 Jahan1373 is offline
Registered User
 
Join Date: Jan 2022
Location: Yes
Posts: 46
Thanks: 104
Thanked 9 Times in 9 Posts
Jahan1373 is on a distinguished road
Smile Script

Hello, thank you for your hard work
If it is possible, can you put the metro script, I have downloaded a few, when it starts, the first page is white, then the page comes, please put this, thank you
Reply With Quote
The Following User Says Thank You to Jahan1373 For This Useful Post:
audiofeel (03-10-2023)
  #15  
Old 06-10-2023, 15:16
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
Preliminarily... failure at startup occurs only if the script is built on version 5.6.1. On version 6.2.2, I have not noticed any failures yet. I could be wrong . It is possible that something is wrong with my pc machine. Or I have a mistake in the script.
youtu.be


sorry for the delayed response; i've been quite busy these past few days and, to be honest, i haven't had a good night's sleep in two days.


it seems that the wGetLogicalDriveList function doesn't function as expected in InnoSetup v5.x. however, the FLogicalDrives class works reliably across all scenarios and has undergone thorough testing.


Code:
type
  FLogicalDrives = interface(IUnknown)
    '{73D9B3A3-6571-474E-B043-7DC8D3248538}'
    procedure FCreate;
    function Count: Integer;
    function CDriveIndex: Integer;
    function Letter(const Index: Integer): WideString;
    function LetterToIndex(const Letter: WideString): Integer;
    function IsRemovable(const Index: Integer): Boolean;
    function MediaType(const Index: Integer): Integer;
    function MediaTypeEx(const Index: Integer; out HealthStatus, Usage: Integer): Integer;
    function SpaceFreeMB(const Index: Integer): Integer;
    function SpaceAvailableMB(const Index: Integer): Integer;
    function SpaceTotalMB(const Index: Integer): Integer;
  end;

Code:
{ Drive Media Type }
const
  HDD_MEDIA_TYPE_UNKNOWN        = $0000;
  HDD_MEDIA_TYPE_USB            = $0001;
  HDD_MEDIA_TYPE_SD             = $0002;
  HDD_MEDIA_TYPE_HDD            = $0003;
  HDD_MEDIA_TYPE_SSD            = $0004;
  HDD_MEDIA_TYPE_SCM            = $0005;
  HDD_MEDIA_TYPE_NVMe           = $0006;

{ Drive Health }
const
  HDD_HEALTH_STATUS_HEALTHY     = $0000;
  HDD_HEALTH_STATUS_WARNING     = $0001;
  HDD_HEALTH_STATUS_UNHEALTHY   = $0002;
  HDD_HEALTH_STATUS_UNKNOWN     = $0005;

{ Drive Usage }
const
  HDD_USAGE_UNKWOWN             = $0000;
  HDD_USAGE_AUTO_SELECT         = $0001; // used for data storage.
  HDD_USAGE_MANUAL_SELECT       = $0002; // used if manually selected by an administrator at the time of virtual disk creation.
  HDD_USAGE_RETIRED             = $0004; // retired from use
  HDD_USAGE_CACHE               = $0005; // used as a cache for other devices.

Code:
  { LogicalDrives }
  LogicalDrives.FCreate;

  if LogicalDrives.Count > 0 then
  begin
    { ListBox }
    ListBox.FCreate(FMXForm.Handle);
    ListBox.SetBounds(NSX(32), NSY(53), NSX(297), NSY(249));
    ListBox.OnChange(@ListBoxOnChange);

    if ImgList.Count >= 2 then
      ListBox.ImageList(ImgList.Handle);

    { ListBox-Items }
    SetArrayLength(ListBoxItems, LogicalDrives.Count);

    ListBox.BeginUpdate;   // BeginUpdate
    for i := 0 to LogicalDrives.Count - 1 do
    begin
      ListBoxItems[i] := InitListBoxItemHandle;
      ListBoxItems[i].FCreate(ListBox.Handle);
      ListBoxItems[i].Text(LogicalDrives.Letter(i));

      if (ImgList.Count >= 2) then
      begin
        if (i = LogicalDrives.CDriveIndex) then  // C-Drive
          ListBoxItems[i].ImageIndex(0)
        else
          ListBoxItems[i].ImageIndex(1);
      end;

      ListBox.AddItem(ListBoxItems[i].Handle);
    end;
    ListBox.EndUpdate;     // EndUpdate
  end else
    MsgBox('"LogicalDrives" failded!', mbError, MB_OK);

.

Last edited by BLACKFIRE69; 14-07-2024 at 02:10.
Reply With Quote
The Following 4 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (06-10-2023), Behnam2018 (06-10-2023), ffmla (07-10-2023), hitman797 (06-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 13:36.


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