procedure TForm1.GotoURL(sURL:String);
begin
with dde do
begin
ServiceApplication:='C:\Program Files\Internet Explorer\IEXPLORE.EXE';
SetLink('IE','打开WWW');
RequestData(sURL+',,0XFFFFFFFF,0X3,,,') ;
CloseLink;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
GotoURL('http://localhost//index.htm');
end;
end.
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240803130933255-1404888097.jpg)