是这样的,当我点击一个按钮之后,想直接显示一个特定的网页,就像在网页上点击超链接一样。

解决方案 »

  1.   

    shellExecute()具体参数请参见msdn帮助
      

  2.   

    //////////////
    1。在USES里加ShellAPI
    uses
      Windows,  SysUtils, ;//shellexecute就定义在ShellApi单元中
    Type
        TShellException = class (Exception)
    end;
    2///////////////
    //执行网页,Email,普通程序
    procedure TShellExecute.Execute ;
    begin
    ShellExecute(self.FHandle,'open',PChar(self.FExeName),nil,nil, SW_SHOW);
    end;////////////////
      

  3.   

    To pressman:请讲的具体一点,我以前没有接触过Internet编程,麻烦你了!
      

  4.   

    ShellExecute(Handle, 'open', PChar(AURL), nil, nil, SW_SHOWNORMAL);
      

  5.   

    strFileName := 'http://www.csdn.net';
      WinExec(PChar('explorer '+strfileName),SW_NORMAL);
      

  6.   

    用twebbrowser
    twebbrowser.navigater('http://www.sohu.com');
      

  7.   

    再回首,泪眼。。
    再回首
    当我再回头就让人家全说了!
    总结一下,呵呵,下流吧
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs,StdCtrls, OleCtrls, SHDocVw;type
      TForm1 = class(TForm)
        Button1: TButton;
        WebBrowser1: TWebBrowser;
        Button2: TButton;
        procedure Button1Click(Sender: TObject);
        procedure Button2Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    begin
    webbrowser1.Navigate('http://www.sohu.com');
    end;procedure TForm1.Button2Click(Sender: TObject);
    begin
     WinExec(PChar('explorer '+'http://www.sohu.com'),SW_NORMAL);
    end;
    end.
      

  8.   

    PubPath:='C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.csdn.net'
    WinExec(PChar(PubPath),1);
      

  9.   

    uses shellapishellexecute(handle,nil,'http://www.csdn.net',nil,nil,sw_shownormal);