请问高手们:怎么样链接到一个网页呀?如何当按一下按钮,让他打开一个网页!

解决方案 »

  1.   

    请问如何用WINDOWS API函数开不同的浏览器窗口?我用了SHELLEXECUTE函数,可是每次只
    能开一个窗口,再执行时还是一个窗口。旧的内容都被新的内容覆盖了。怎样才能开新窗口?1:ShellExecute(handle....) handle不一样即可;
    2:
    uses ComObj;procedure TForm1.Button1Click(Sender: TObject);
      procedure OpenInIE(aURL: string);   //need uses ComObj;
      var
        IE        : Variant;
      begin
        IE := CreateOleObject('InternetExplorer.Application');
        IE.Visible := true;
        IE.Navigate(aURL);
      end;
    begin
      OpenInIE('www.delphibbs.com');
    end;
      

  2.   

    shellexecute(handle,'open','explorer.exe','kingron.myetang.com',nil,SW_SHOW);
      

  3.   

    liangzisiyun(良子) 的方法较好,也可以写成
    shellexecute(handle,'http://kingron.myetang.com',nil,nil,SW_SHOW);
      

  4.   

    Uses ShellAPI的
    ShellExecute
      

  5.   

    另一种方法:
    winexec('explorer.exe http://kingron.myetang.com',9)
      

  6.   

    哪里出问题了
    为什么这样打不开IE:
    procedure TForm1.Button1Click(Sender: TObject);
    var
    StartupInfo:TStartupInfo ;
    ProcessInfo:TProcessInformation ;
    begin
    FillChar(StartupInfo,Sizeof(StartupInfo),#0) ;
    StartupInfo.cb := Sizeof(StartupInfo);
    StartupInfo.dwFlags := STARTF_USESHOWWINDOW;
    CreateProcess(nil,'explorer.exe', nil,nil,false,CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS ,
    nil,nil,StartupInfo,ProcessInfo) ;
    end;
      

  7.   

    uses  
      ShellApi
        ..  ShellExecute(Handle,'Open','http://www.csdn.net','','',SW_NORMAL);
      

  8.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, ShellAPI, StdCtrls, Buttons;type
      TForm1 = class(TForm)
        BitBtn1: TBitBtn;
        procedure BitBtn1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
        procedure OpenObject(sObjectPath: PChar);  end;var
      Form1: TForm1;implementation{$R *.dfm}
    procedure TForm1.OpenObject(sObjectPath: PChar);
    begin
      ShellExecute(0, nil, sObjectPath, nil, nil, SW_NORMAL);
    end;procedure TForm1.BitBtn1Click(Sender: TObject);
    var
      TempString: array[0..79] of char;
    begin
      StrPCopy(TempString, BitBtn1.Caption);
      OpenObject(TempString);
    end;end.