用默认浏览器打开,uses shellapi} procedure TForm1.Button2Click(Sender: TObject); begin ShellExecute(Application.Handle, nil, 'http://www.', nil, nil, SW_SHOWNORMAL); end; {以下三种用IE浏览器打开} {uses shellapi} procedure TForm1.Button1Click(Sender: TObject); begin ShellExecute(Application.Handle, 'open','Iexplore.exe','http://www.',nil,SW_SHOWNORMAL); end; procedure TForm1.Button2Click(Sender: TObject); begin ShellExecute(Application.Handle, nil, 'http://www.', 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.'); end; |
|