procedure OpenInternetExplorer(sURL : string);//sURL参数为你要浏览的网址
const
csOLEObjName = 'InternetExplorer.Application';
var
IE : Variant;
WinHandle : HWnd;
begin
if VarIsEmpty(IE) then
begin
IE := CreateOleObject(csOLEObjName);
IE.Visible := true;
IE.Navigate(sURL);
end
else
begin
WinHandle := FindWindow('IEFrame', nil);
if WinHandle <> 0 then
begin
IE.Navigate(sURL);
SetForegroundWindow(WinHandle);
end
else
begin
// handle error ...
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
OpenInternetExplorer('www.sina.com.cn');
end;