Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to invoke the Windows ShortCut Dialog wizard?

Answer Posted / editcdc

function InvokeShortCutDialog(Directory : string) : boolean;
var
Reg : TRegistry;
CmdLine : string;
begin
Result := false;
Reg := TRegistry.Create;
try
Reg.Rootkey := HKEY_CLASSES_ROOT;
if Reg.OpenKeyReadOnly('.LNKShellNew') then
begin
CmdLine := Reg.ReadString('Command');
CmdLine := StringReplace(CmdLine, '%1', Directory, []);
Result := True;
WinExec(PChar(CmdLine), SW_SHOWNORMAL );
end
finally
Reg.free;
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
InvokeShortCutDialog('c:Temp');
end;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Use Stored Procedures ?

1669


How to create an icon from a bitmap?

1820


How to capture an image from a video source?

1709


How to Set break on exception in Delphi 4?

1757


How to avoid "Random" Exceptions being raised when using TJPEGImage or the JPEG unit?

1684


Explain the MasterSource/MasterFields behavior?

1982


How to activate different hints for each cell in a grid?

1704


How to Change the root key ?

1869


How to Convert Data in Paradox Tables to InterBase Using Delphi?

1710


How to Loada local html file in the HTML control ?

1795


what are Safe Mode and VGA mode?

1709


How to Create resource files?

1580


How to eject a CD-ROM in code?

1853


How to Declare a SafeArray in the type library editor?

2177


How to Change the port of a printer?

2261