unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
public
end;var
Form1: TForm1;implementationuses ShellAPI;{$R *.dfm}function ShellProperties(aFileName: String; aHandle: HWND): Boolean;
var
aSHELLEXECUTEINFO: TSHELLEXECUTEINFO;
begin
with aSHELLEXECUTEINFO do
begin
cbSize := SizeOf(aSHELLEXECUTEINFO);
lpFile := PAnsiChar(aFileName);
Wnd := aHandle;
fMask := SEE_MASK_INVOKEIDLIST;
lpVerb := PAnsiChar('properties');
lpIDList := nil;
lpDirectory := nil;
nShow := 0;
hInstApp := 0;
lpParameters := nil;
dwHotKey := 0;
hIcon := 0;
hkeyClass := 0;
hProcess := 0;
lpClass := nil;
end;
Result := ShellExecuteEX(@aSHELLEXECUTEINFO);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ShellProperties('h:\', Handle);
end;end.
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
public
end;var
Form1: TForm1;implementationuses ShellAPI;{$R *.dfm}function ShellProperties(aFileName: String; aHandle: HWND): Boolean;
var
aSHELLEXECUTEINFO: TSHELLEXECUTEINFO;
begin
with aSHELLEXECUTEINFO do
begin
cbSize := SizeOf(aSHELLEXECUTEINFO);
lpFile := PAnsiChar(aFileName);
Wnd := aHandle;
fMask := SEE_MASK_INVOKEIDLIST;
lpVerb := PAnsiChar('properties');
lpIDList := nil;
lpDirectory := nil;
nShow := 0;
hInstApp := 0;
lpParameters := nil;
dwHotKey := 0;
hIcon := 0;
hkeyClass := 0;
hProcess := 0;
lpClass := nil;
end;
Result := ShellExecuteEX(@aSHELLEXECUTEINFO);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ShellProperties('h:\', Handle);
end;end.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货