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 Check available disk space on large drives?

0 Answers  


'Interface not supported' . what does this error mean?

1 Answers  


How to Move the application server to another machine?

0 Answers  


How to convert a .dfm file to text and vise versa?

0 Answers  


How to Use Stored Procedures ?

0 Answers  


How to create an example of your problem for Borland Developer Support?

0 Answers  


How to place a bitmap in a Metafile?

0 Answers  


How to print an HTML document from inside of your application?

0 Answers  


How to change an ISAPI DLL project to a CGI project, or vice-versa?

0 Answers  


Where is the file dsgnintf.pas?

2 Answers  


How to Get the size of the desktop?

1 Answers  


How to Load a TListView component that contains SubItems?

0 Answers  


Categories