Vb, Delphi, .net, framework, C++, Java, Pascal,Visual Studio, Asm, Ruby, C#, j#, Cs, Html, Php, Perl, Asp, xHtml Get Free Souce Code Here...



Show Windows properties window - Delphi

This function uses Shell API

The function:

function VisaEgenskaper(hWndOwner: HWND; const FileName: string): Boolean;
var Info: TShellExecuteInfo;
begin
{ Fill in the SHELLEXECUTEINFO structure }
with Info do
begin
cbSize := SizeOf(Info);
fMask := SEE_MASK_NOCLOSEPROCESS or
SEE_MASK_INVOKEIDLIST or
SEE_MASK_FLAG_NO_UI;
wnd := hWndOwner;
lpVerb := 'properties';
lpFile := pChar(FileName);
lpParameters := nil;
lpDirectory := nil;
nShow := 0;
hInstApp := 0;
lpIDList := nil;
end;

{ Call Windows to display the properties dialog. }
Result := ShellExecuteEx(@Info);
end;


Call the function with this line:

VisaEgenskaper(Application.Handle, 'C:\Thomas.txt');

0 comments:

Post a Comment