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 detect the CPU type of the computer the application is running on?

1714


what are the uses of Arrow and Function Keys ?

2135


How to launch a control panel applet?

1950


How to Use JPEGs from resource files ?

1711


what are the common Problems with printing, preview and paper size in Quick Reports?

1639


Explain about Multi-Threaded ISAPI DLLs ?

2141


How to Set a transparent background color for TImageList?

1946


what is the use of TSocketDispatcher?

1955


How to Display a bitmap on the client area of an MDI parent form?

1606


What is the difference between Delphi and Delphi Client/Server?

890


Do I have to know a lot about the Windows API to use Delphi?

867


How to create a Resource only DLL?

1869


How to Display a file's associated icon?

1930


How to Move the application server to another machine?

1488


How to Link an animated cursor to a resource file?

1668