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

Is Turbo Pascal still available?

1790


How to Select an item in a TListView when the checkbox is checked ?

1896


How does one change the default directory that Delphi uses to save projects?

2292


How to detect the CPU type of the computer the application is running on?

1818


How to Handle exceptions in Delphi?

1745


What are the Benefits of the ConstraintBroker?

1661


How to pass functions or procedures to other functions or procedures?

1574


What if I do not have a CD-ROM drive?

849


Does Delphi have an equivalent to the Visual Basic SendKeys function?

2026


How to Add hint windows to applications?

1802


How to Clear the window in a console application?

1677


How to custom draw menu items?

2231


How to use sets in code, such as adding to TDBGrid.Options, at run time?

2435


How to Change the port of a printer?

2336


Do I have to understand object-oriented programming to use Delphi?

950