Internet shortcuts are diverse from regular shortcuts that point to a document or an application. Such text files with a .url extension have their content in INI file format.
Here's a sample content of an Internet Shortcut file:
[InternetShortcut]
URL=http://delphi.about.com
Here's how to read the URL from an Internet Shortcut file using Delphi code:
~~~~~~~~~~~~~~~~~~~~~~~~~
uses iniFiles;
function URLFromShortcut(const dotURL: string): string;
begin
with TIniFile.Create(dotURL) do
try
try
Result := ReadString('InternetShortcut', 'URL', '') ;
except;
Result := '';
end;
finally
Free;
end;
end;
//Usage
var URL : string;
URL := URLFromShortcut('c:\myshortcut.url') ;
~~~~~~~~~~~~~~~~~~~~~~~~~
Delphi tips navigator:
» How to create a thumbnail image from a stream
« How to change the web form's enctype attribute (to "multipart/form-data")

