http://www.csdn.net/expert/topic/799/799541.xml?temp=.3593714
打开网页
  ShellExecute(Handle,'open',Pchar('http://www.sohu.com'),nil,nil,SW_SHOW);

解决方案 »

  1.   

    vs:string;
    vs:=myinifile.ReadString('ABC','a1',缺省值);
    OpenUrl(vs);
      

  2.   

    uses Inifiles;
    Filename:=ExtractFilePath(Paramstr(0))+'xxxx.ini';//xxxx.ini为你存储的文件
    myinifile:=TiniFile.create(filename);
      

  3.   

    var
      I: Integer;
    begin
    with TStringList.Create do
    try
      LoadFromFile('Ini.ini');
      for I := 0 to Count - 1 do
        if Values['a' + IntToStr(I)] <> '' then 
          OpenURL(Values['a' + IntToStr(I)])
        else
          Break;
    finally
      Free;
    end;
    end;
    如果不是Ini文件的格式,是纯下面的格式的话,就不需要if语句来判断,直接用OpenURL函数即可。
    a1=http://www.163.com
    a2=http://www.skycn.com
    a3=http://www.169.net
    a4=……
    ……=……
      

  4.   

    inifile +shelllexecute
    ShellExecute(Handle,'open',Pchar('http://www.sohu.com'),nil,nil,SW_SHOW);由于文件关联,你也许不用指定handle为ie,具体查msdn吧!
      

  5.   

    嗬嗬,你最好把你得INI的格式改一下!
    [ABC]
    URLCount=...
    a1=http://www.163.com
    a2=http://www.skycn.com
    a3=http://www.169.net
    a4=……
    ……=……
    这样不就结了?
    你看看注册表,有好多记录最近访问文件菜单得键值,都用这种方法!
      

  6.   

    vs:string;
    vs:=myinifile.ReadString('ABC','a1',缺省值);
    OpenUrl(vs);
      

  7.   

    至于运行,如果你不用自己的浏览器的话!
    ShellExecute(Handle,'open',Pchar('http://www.sohu.com'),nil,nil,SW_MAXIMIZE);
    就行了
      

  8.   

    to hezchuan168(开心果) 给我看看行不?