RT,如不行,该如何实现呢,谢谢!

解决方案 »

  1.   

    当然可以var
     URL:='www.google.hk';
    ShellExecute(Handle,'open',pchar(URL),nil,nil,1)
      

  2.   

    var
    URL:string;
    begin
    URL:='WWW.GOOGLE.HK';
    ShellExecute(Handle,'open',pchar(URL),nil,nil,1);
    end
      

  3.   

    用winexec使用变量打开网页怎么写呢,我试了下失败了。
      

  4.   


    你使用shellexecute需要使用shellapi单元,winexec需要获取浏览器的路径,xxxxx\iexplore.exe www.google.com这样用,在这方面shellexecute的适用性好,相当于开始菜单运行的功能,调用的是系统文件关联去打开对象的,比如打开www.google.com就会去读取注册表中http的open下面的默认项。
      

  5.   

    仿照shellexecuteprocedure TForm1.Button2Click(Sender: TObject);
    var url:string;
    begin
      url:= '"C:\Program Files\Internet Explorer\iexplore.exe" www.baidu.com';
      WinExec('pchar(url)', 1);
    end;没有反应?
      

  6.   

    你干嘛要用单引号把Pchar(url)括起来?