هذا الكود يقوم باظهار خصائص ملف معين تخاره بواسط OpenDialog1
اي كم لو ضغطت على زر الفارة اليمين فوق ملف ثم اخترت خصائص
.
.
uses ShellAPI;
procedure InvokeFilePropDlgBox(hwnd: HWND; const F: string);
var
FileInfo: TShellExecuteInfo;
begin
with FileInfo do
begin
cbSize := SizeOf(FileInfo);
fMask := SEE_MASK_NOCLOSEPROCESS or SEE_MASK_INVOKEIDLIST;
wnd := hwnd;
lpVerb := 'Properties' ; //Try nil here
lpFile := PChar(F);
lpParameters := nil;
lpDirectory := nil;
nShow := 0;
hInstApp := 0;
lpIDList := nil;
end;
ShellExecuteEx(@FileInfo);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
F: String;
begin
if OpenDialog1.Execute then
F:= OpenDialog1.FileName;
InvokeFilePropDlgBox(Handle,F);
end;
شكرا