Показать свойства файла
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, SoCtrls, SoSpecEdit, ShellAPI;
type
TForm1 = class(TForm)
Button1: TButton;
sohoFilenameEdit1: TsohoFilenameEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure ShowPropertiesDialog(FName: string);
var
SExInfo: TSHELLEXECUTEINFO;
Error: LongInt;
begin
ZeroMemory(Addr(SExInfo),SizeOf(SExInfo));
SExInfo.cbSize := SizeOf(SExInfo);
SExInfo.lpFile := PChar(FName);
SExInfo.lpVerb := 'properties';
SExInfo.fMask := SEE_MASK_INVOKEIDLIST;
ShellExecuteEx(Addr(SExInfo));
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowPropertiesDialog(sohoFilenameEdit1.FileName);
end;
end.
|
|