如何单击一个按扭,打开一个网页?例如:打开www.sohu.com,浏览器要用IE 打开.
有个控件可以实现的,不过它类似于TLabel控件,我不喜欢,我偏爱按扭.

解决方案 »

  1.   

    在按钮的Onclick事件中写入:
    begin
      ShellExecute(Application.Handle,'open','http://www.sohu.com',nil,nil,SW_SHOWNORMAL);
    end;
      

  2.   

        ShellExecute(handle,'open','http://www.baidu.com','','',SW_SHOWNORMAL);
      

  3.   

    指定IE打开新页面:
    begin
      ShellExecute(Application.Handle,'open','iexplore.exe','http://www.sohu.com',nil,SW_SHOWNORMAL);
    end;
      

  4.   

    ShellExecute(Self.Handle,'Open','http://www.xiaozj.com',nil,nil,0);
      

  5.   

    还可以用构建实现:WebBrowser1.Navigate('http://blog.csdn.net/hicsdn.aspx?username=internetroot');