
12.05.2009, 14:29
|
Активный
|
|
Регистрация: 29.03.2009
Сообщения: 300
Репутация: 94
|
|
Код:
procedure TForm1.Button2Click(Sender: TObject);
const
_URL = 'http://www.google.com'; // можете заменить на своё
var
WinDir: PChar;
RunDLLPath: string;
begin
GetMem(WinDir, MAX_PATH);
try
GetWindowsDirectory(WinDir, MAX_PATH);
RunDLLPath := StrPas(WinDir) + '\system32\rundll32.exe';
ShellExecute(Handle, PChar('open'), @RunDLLPath[1],
PChar('url.dll,FileProtocolHandler ' + _URL),
nil, SW_SHOWNORMAL);
finally
FreeMem(WinDir);
end;
end;
|