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?



How to invoke the Windows ShortCut Dialog wizard?..

Answer / 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

More Delphi Interview Questions

How to Place a grid in edit mode programatically?

0 Answers  


Does Delphi support the back-end?

0 Answers  


Can a Delphi Application Connect to an InterBase Database on Any Platform?

0 Answers  


How to Get values in a TDBGrid before they are posted?

0 Answers  


How to Send an image to the printer ?

0 Answers  


How to Get the time and date in Universal Time ?

0 Answers  


I am trying to call from Delphi and it GPFs. Whats up?

0 Answers  


How to get a TRichEdit to scroll in code?

0 Answers  


How to Trapp non client areas ?

0 Answers  


How to Display documents in the default browser?

0 Answers  


what are the Font problems on NT 4.0?

0 Answers  


How to create an icon from a bitmap?

0 Answers  


Categories