Jump to content
Tuts 4 You

[Delphi] File Inspector Source Code


0xFF

Recommended Posts

  • 2 weeks later...

yep that's right it's a stupid project :down: but still usefull for noobs :rolleyes:

@Apuromafo:

here is the attachment ;)

File Inspector.rar

thanks bro, alwais is good try to learn some ...maybe someday will do some with delphi

greetings

Apuromafo CLS

 object rbRecycle: TRadioButton
Left = 560
Top = 87
Width = 65
Height = 17
Hint = 'Moves the file to the recycle bin'
Caption = 'Recycle'
ParentShowHint = False
ShowHint = True
TabOrder = 6
end

example that some values important to check to learn is things as floating values:

Procedure TFileInspectorClass.btnSearchClick(Sender: TObject);
var
hFind: THandle;
ListItem: TListItem;
modedFile: Integer;
Icon: TIcon;
Float: Extended; // in C, it's float, in Delphi it's Extended, which will be used on float numbers (X,XXX)
psfi: TSHFILEINFO; // Structure..
Data: TWin32FindData; // WIN32_FIND_DATA Structure
begin
if DirectoryExists( CurrentDir ) = False then // Check if the directory exists before approaching the scan
begin
MessageDlg('Directory Does Not Exists', mtWarning, [mbOk], 0);
Exit;
end;

or variables of executing:


procedure TFileInspectorClass.Open1Click(Sender: TObject);
begin
ShellExecute( Application.Handle, 'Open', PChar( FileView.ItemFocused.Caption ), nil, PChar( CurrentDir ), SW_SHOWNORMAL );
end;
Edited by Apuromafo
Link to comment

Float: Extended; // in C, it's float, in Delphi it's Extended, which will be used on float numbers (X,XXX)

In Delphi you can also use...


Currency A floating point type with 4 decimals used for financial values
Double A floating point type supporting about 15 digits of precision
Extended The floating point type with the highest capacity and precision
Real A floating point type supporting about 15 digits of precision
Real48 The floating point type with the highest capacity and precision
Single The smallest capacity and precision floating point type

Conclusion

While you are 100% correct by using Extended, its not always the optimal type to use, For example if you only needed a floating point value of 15 or less I would recommend using one of the other types as it will reduce allocated bytes need for that type as opposed to Extened type which would require more allocated bytes.

Edited by Departure
Link to comment

im trying to learn about coding , because i only can debug/unpack redo some thinks,, but now is a big time to search and saving ,in spanish+english, maybe some time i can do my first keygen in delphi in some day..or multicoding..

//any stuff new, is a opportunity to learn. :)

greetings Apuromafo

Link to comment

I want to mention that the part (code) where it gets file Icons (using TImageList) was not by me (cause my programming skills back then sucked), I think I comment that code with the original author.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...