Beranda > Delphi > Showing the properties of a file

Showing the properties of a file

To show the file property dialog commonly used in Windows, call the ShowFileProperties() procedure below passing the filename:uses ShellAPI;

procedure ShowFileProperties(const FileName: string);
{ Displays the Properties dialog for a file or directory. }
{ Thanks to Peter Below (TeamB) <100113.1101@compuserve.com> }
{ for this code. }

var
sei: TShellExecuteInfo;
begin
FillChar(sei, SizeOf(sei), 0);
sei.cbSize := SizeOf(sei);
sei.lpFile := PChar(FileName);
sei.lpVerb := ‘properties’;
sei.fMask := SEE_MASK_INVOKEIDLIST;
ShellExecuteEx(@sei);
end;

Iklan
Kategori:Delphi
  1. Belum ada komentar.
  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: