本文整理自网络,侵删。
用默认浏览器打开,uses shellapi}
procedure TForm1.Button2Click(Sender: TObject);
begin
ShellExecute(Application.Handle, nil, 'http://www.3464.com', nil, nil, SW_SHOWNORMAL);
end;
{以下三种用IE浏览器打开}
{uses shellapi}
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Application.Handle, 'open','Iexplore.exe','http://www.3464.com',nil,SW_SHOWNORMAL);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShellExecute(Application.Handle, nil, 'http://www.3464.com', nil, nil, SW_SHOWNORMAL);
end;
//uses SHDocVw;
procedure TForm1.Button4Click(Sender: TObject);
var
IE : OleVariant;
begin
IE := CoInternetExplorer.Create;
IE.Visible := True;
IE.Navigate2('http://www.3464.com');
end;
相关阅读 >>
Delphi中indy10 的idtcpserver断开客户端连接报错问题的解决办法
更多相关阅读请进入《Delphi》频道 >>