我用AxSHDocVw.AxWebBrowser控件做了一个浏览器现在需要加一个自己定义的头信息不知道怎么来加,求大家帮忙.能告诉我怎么把这个浏览器的现有头信息怎么修改也可以.
先谢啦..

解决方案 »

  1.   

    你说的是Title么?如果是把AxSHDocVw.AxWebBrowser嵌在form里的话,可以用this.Text="你要设定的头名称";来实现。
      

  2.   

    Http头信息可以通过Navigate函数的最后一个参数Headers传入
    object.Navigate2( _
        URL As Variant, _
        [Flags As Variant,] _
        [TargetFrameName As Variant,] _
        [PostData As Variant,] _
        [Headers As Variant])Headers
    Optional.  A value that specifies additional HTTP headers to send to the server. These headers are added to the default Microsoft Internet Explorer headers. The headers can specify things like the action required of the server, the type of data being passed to the server, or a status code. This parameter is ignored if a URL is not an HTTP URL.
      

  3.   

    对啊,同意楼上的,用Navigate函数,其中的参数可包括HTTP整个URL
      

  4.   

    实现INegotiateCallback和IHttpNegotiate直接用URL Moniker下载网页是可以的,但是似乎没人知道怎么让浏览器控件调用这些接口。用Navigate只对页面有效,对于页面的关联资源,例如脚本和图片无效。参考文章
    http://www.microsoft.com/china/MSDN/library/WebServices/WebServices/eamwebteam.mspx
    http://blogs.msdn.com/ie/archive/2005/03/12/394526.aspx